aboutsummaryrefslogtreecommitdiff
path: root/server/szurubooru/tests/api
diff options
context:
space:
mode:
authorHunternif2025-02-15 18:12:57 +0000
committerHunternif2025-02-15 18:12:57 +0000
commit6a5300502df8b4de9c8f269b444cd309f02b28ad (patch)
tree0cf2ba56bce802c94ad324f9eda7a31d37a42e2e /server/szurubooru/tests/api
parent34e7c883808738871aed371948a3c9896a95905c (diff)
parent376f687c386f65522b2f65e98b998b21af26ee29 (diff)
Merge branch 'master' into hunternif
Diffstat (limited to 'server/szurubooru/tests/api')
-rw-r--r--server/szurubooru/tests/api/test_tag_updating.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/server/szurubooru/tests/api/test_tag_updating.py b/server/szurubooru/tests/api/test_tag_updating.py
index 9112c29..66939a4 100644
--- a/server/szurubooru/tests/api/test_tag_updating.py
+++ b/server/szurubooru/tests/api/test_tag_updating.py
@@ -167,8 +167,9 @@ def test_trying_to_create_metric_without_privileges(
)
+@pytest.mark.parametrize("type", ["suggestions", "implications"])
def test_trying_to_create_tags_without_privileges(
- config_injector, context_factory, tag_factory, user_factory
+ config_injector, context_factory, tag_factory, user_factory, type
):
tag = tag_factory(names=["tag"])
db.session.add(tag)
@@ -187,16 +188,7 @@ def test_trying_to_create_tags_without_privileges(
with pytest.raises(errors.AuthError):
api.tag_api.update_tag(
context_factory(
- params={"suggestions": ["tag1", "tag2"], "version": 1},
- user=user_factory(rank=model.User.RANK_REGULAR),
- ),
- {"tag_name": "tag"},
- )
- db.session.rollback()
- with pytest.raises(errors.AuthError):
- api.tag_api.update_tag(
- context_factory(
- params={"implications": ["tag1", "tag2"], "version": 1},
+ params={type: ["tag1", "tag2"], "version": 1},
user=user_factory(rank=model.User.RANK_REGULAR),
),
{"tag_name": "tag"},

© 2015 - 2026 Jakob L. Kreuze