summaryrefslogtreecommitdiff
path: root/server/szurubooru/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/szurubooru/tests')
-rw-r--r--server/szurubooru/tests/api/test_post_retrieving.py3
-rw-r--r--server/szurubooru/tests/search/configs/test_post_search_config.py1
-rw-r--r--server/szurubooru/tests/search/test_executor.py5
3 files changed, 8 insertions, 1 deletions
diff --git a/server/szurubooru/tests/api/test_post_retrieving.py b/server/szurubooru/tests/api/test_post_retrieving.py
index 0e9e918..d66a1f5 100644
--- a/server/szurubooru/tests/api/test_post_retrieving.py
+++ b/server/szurubooru/tests/api/test_post_retrieving.py
@@ -16,7 +16,9 @@ def inject_config(config_injector):
"privileges": {
"posts:list": model.User.RANK_REGULAR,
"posts:view": model.User.RANK_REGULAR,
+ "posts:view:sketchy": model.User.RANK_REGULAR,
"posts:view:unsafe": model.User.RANK_REGULAR,
+ "posts:list:sketchy": model.User.RANK_REGULAR,
"posts:list:unsafe": model.User.RANK_REGULAR,
},
}
@@ -188,6 +190,7 @@ def test_trying_to_retrieve_unsafe_without_privileges(
{
"privileges": {
"posts:view": "anonymous",
+ "posts:view:sketchy": "regular",
"posts:view:unsafe": "regular",
},
}
diff --git a/server/szurubooru/tests/search/configs/test_post_search_config.py b/server/szurubooru/tests/search/configs/test_post_search_config.py
index f04dabc..9f59b54 100644
--- a/server/szurubooru/tests/search/configs/test_post_search_config.py
+++ b/server/szurubooru/tests/search/configs/test_post_search_config.py
@@ -64,6 +64,7 @@ def auth_executor(executor, user_factory, config_injector):
config_injector(
{
"privileges": {
+ "posts:list:sketchy": model.User.RANK_REGULAR,
"posts:list:unsafe": model.User.RANK_REGULAR,
}
}
diff --git a/server/szurubooru/tests/search/test_executor.py b/server/szurubooru/tests/search/test_executor.py
index 5c52f72..21817c1 100644
--- a/server/szurubooru/tests/search/test_executor.py
+++ b/server/szurubooru/tests/search/test_executor.py
@@ -10,7 +10,10 @@ from szurubooru.func import cache
def inject_config(config_injector):
config_injector(
{
- "privileges": {"posts:list:unsafe": model.User.RANK_REGULAR},
+ "privileges": {
+ "posts:list:sketchy": model.User.RANK_REGULAR,
+ "posts:list:unsafe": model.User.RANK_REGULAR,
+ },
}
)