summaryrefslogtreecommitdiff
path: root/server/szurubooru/tests/api/test_post_retrieving.py
diff options
context:
space:
mode:
authorrr- <rr-@sakuya.pl>2016-08-26 13:43:55 +0200
committerrr- <rr-@sakuya.pl>2016-08-26 14:41:05 +0200
commitbb369efa995f6ca2f07415f9d0890582f6e17627 (patch)
tree028bc8a45891f5cf6992ef4ca0354ae7a5e5439f /server/szurubooru/tests/api/test_post_retrieving.py
parent7451d16baf34cceaf34b20fdc75a34b189e70b38 (diff)
server/general: disable autoflush
Diffstat (limited to 'server/szurubooru/tests/api/test_post_retrieving.py')
-rw-r--r--server/szurubooru/tests/api/test_post_retrieving.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/szurubooru/tests/api/test_post_retrieving.py b/server/szurubooru/tests/api/test_post_retrieving.py
index e37e1ec..a33d60a 100644
--- a/server/szurubooru/tests/api/test_post_retrieving.py
+++ b/server/szurubooru/tests/api/test_post_retrieving.py
@@ -19,6 +19,7 @@ def test_retrieving_multiple(user_factory, post_factory, context_factory):
post1 = post_factory(id=1)
post2 = post_factory(id=2)
db.session.add_all([post1, post2])
+ db.session.flush()
with patch('szurubooru.func.posts.serialize_post'):
posts.serialize_post.return_value = 'serialized post'
result = api.post_api.get_posts(
@@ -82,6 +83,7 @@ def test_trying_to_retrieve_multiple_without_privileges(
def test_retrieving_single(user_factory, post_factory, context_factory):
db.session.add(post_factory(id=1))
+ db.session.flush()
with patch('szurubooru.func.posts.serialize_post'):
posts.serialize_post.return_value = 'serialized post'
result = api.post_api.get_post(