diff options
| author | rr- | 2016-05-22 17:51:43 +0200 |
|---|---|---|
| committer | rr- | 2016-05-22 22:17:11 +0200 |
| commit | fa14bf714c832df3f8d34c9761a8f3f893ca3de5 (patch) | |
| tree | cc89148b9c1911a04693308b20dd597c855962f1 /server/szurubooru/tests/api | |
| parent | 6a48020426de95cff2273abddaf968f53e86ea5e (diff) | |
server/tags: create snapshots for automatic tags
Diffstat (limited to 'server/szurubooru/tests/api')
| -rw-r--r-- | server/szurubooru/tests/api/test_tag_creating.py | 3 | ||||
| -rw-r--r-- | server/szurubooru/tests/api/test_tag_updating.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/server/szurubooru/tests/api/test_tag_creating.py b/server/szurubooru/tests/api/test_tag_creating.py index 78f8d87..e758f91 100644 --- a/server/szurubooru/tests/api/test_tag_creating.py +++ b/server/szurubooru/tests/api/test_tag_creating.py @@ -249,11 +249,12 @@ def test_reusing_suggestions_and_implications(test_ctx): } ]) def test_tag_trying_to_relate_to_itself(test_ctx, input): - with pytest.raises(tags.InvalidTagRelationError): + with pytest.raises(tags.TagAlreadyExistsError): test_ctx.api.post( test_ctx.context_factory( input=input, user=test_ctx.user_factory(rank=db.User.RANK_REGULAR))) + db.session.rollback() assert tags.try_get_tag_by_name('tag') is None def test_trying_to_create_tag_without_privileges(test_ctx): diff --git a/server/szurubooru/tests/api/test_tag_updating.py b/server/szurubooru/tests/api/test_tag_updating.py index cde09ff..d94a033 100644 --- a/server/szurubooru/tests/api/test_tag_updating.py +++ b/server/szurubooru/tests/api/test_tag_updating.py @@ -16,6 +16,7 @@ def test_ctx( 'tag_name_regex': '^[^!]*$', 'tag_category_name_regex': '^[^!]*$', 'privileges': { + 'tags:create': db.User.RANK_REGULAR, 'tags:edit:names': db.User.RANK_REGULAR, 'tags:edit:category': db.User.RANK_REGULAR, 'tags:edit:suggestions': db.User.RANK_REGULAR, |