aboutsummaryrefslogtreecommitdiff
path: root/server/szurubooru/tests/func/test_posts.py
diff options
context:
space:
mode:
authorrr-2016-08-14 20:06:49 +0200
committerrr-2016-08-16 21:51:25 +0200
commit80af79779d01fe949af84fdb43f6b82085cd4a9c (patch)
tree5353b010afb89292ea5ab693ead355dc2426fb65 /server/szurubooru/tests/func/test_posts.py
parent03a7bd0d5cbf52a9de8ad6aacad5f173c2e56785 (diff)
server/snapshots: rewrite
Diffstat (limited to 'server/szurubooru/tests/func/test_posts.py')
-rw-r--r--server/szurubooru/tests/func/test_posts.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/szurubooru/tests/func/test_posts.py b/server/szurubooru/tests/func/test_posts.py
index a2b9169..43581b6 100644
--- a/server/szurubooru/tests/func/test_posts.py
+++ b/server/szurubooru/tests/func/test_posts.py
@@ -3,8 +3,7 @@ from unittest.mock import patch
from datetime import datetime
import pytest
from szurubooru import db
-from szurubooru.func import (
- posts, users, comments, snapshots, tags, images, files, util)
+from szurubooru.func import (posts, users, comments, tags, images, files, util)
@pytest.mark.parametrize('input_mime_type,expected_url', [
@@ -78,14 +77,12 @@ def test_serialize_post(
config_injector({'data_url': 'http://example.com/'})
with patch('szurubooru.func.comments.serialize_comment'), \
patch('szurubooru.func.users.serialize_micro_user'), \
- patch('szurubooru.func.posts.files.has'), \
- patch('szurubooru.func.snapshots.get_serialized_history'):
+ patch('szurubooru.func.posts.files.has'):
files.has.return_value = True
users.serialize_micro_user.side_effect \
= lambda user, auth_user: user.name
comments.serialize_comment.side_effect \
= lambda comment, auth_user: comment.user.name
- snapshots.get_serialized_history.return_value = 'snapshot history'
auth_user = user_factory(name='auth user')
post = db.Post()
@@ -178,7 +175,6 @@ def test_serialize_post(
'favoritedBy': ['fav1'],
'hasCustomThumbnail': True,
'mimeType': 'image/jpeg',
- 'snapshots': 'snapshot history',
'comments': ['commenter1', 'commenter2'],
}

© 2015 - 2026 Jakob L. Kreuze