From 78612e1da1b2c0c7768d700d9a4ec360cd878945 Mon Sep 17 00:00:00 2001 From: rr- Date: Mon, 30 May 2016 23:23:22 +0200 Subject: server/posts: add new fields --- server/szurubooru/tests/func/test_posts.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/szurubooru/tests/func/test_posts.py') diff --git a/server/szurubooru/tests/func/test_posts.py b/server/szurubooru/tests/func/test_posts.py index 4d45a97..fa8abc4 100644 --- a/server/szurubooru/tests/func/test_posts.py +++ b/server/szurubooru/tests/func/test_posts.py @@ -96,13 +96,11 @@ def test_serialize_post( post.canvas_height = 300 post.flags = ['loop'] db.session.add(post) - post.comments = [ - comment_factory(user=user_factory(name='commenter1')), - comment_factory(user=user_factory(name='commenter2')), - ] db.session.flush() db.session.add_all([ + comment_factory(user=user_factory(name='commenter1'), post=post), + comment_factory(user=user_factory(name='commenter2'), post=post), db.PostFavorite( post=post, user=user_factory(name='fav1'), @@ -150,6 +148,10 @@ def test_serialize_post( 'user': 'post author', 'score': 1, 'ownScore': -1, + 'tagCount': 2, + 'favoriteCount': 1, + 'commentCount': 2, + 'noteCount': 0, 'featureCount': 1, 'lastFeatureTime': datetime.datetime(1999, 1, 1), 'favoritedBy': ['fav1'], -- cgit v1.3