diff options
| author | rr- <rr-@sakuya.pl> | 2016-05-30 23:23:22 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2016-05-30 23:23:22 +0200 |
| commit | 78612e1da1b2c0c7768d700d9a4ec360cd878945 (patch) | |
| tree | 247559ae4c10256bfb7b6eed042f822aab19d127 /server/szurubooru/tests/func/test_posts.py | |
| parent | 037fbc61ec3b661e9581152dd9344416915a6d7e (diff) | |
server/posts: add new fields
Diffstat (limited to 'server/szurubooru/tests/func/test_posts.py')
| -rw-r--r-- | server/szurubooru/tests/func/test_posts.py | 10 |
1 files changed, 6 insertions, 4 deletions
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'], |