aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_resources.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-25 06:02:38 +0300
committerFrederick Muriuki Muriithi2023-05-25 06:18:25 +0300
commit8593d882ed1eea226eeefabaa66135df2374746f (patch)
tree972d233da4b6fa9238263277b579880e0862aeaa /tests/unit/auth/test_resources.py
parent5f9f4ff97c27a0f34a86eec516ab3f58faf5937e (diff)
downloadgenenetwork3-8593d882ed1eea226eeefabaa66135df2374746f.tar.gz
Set whether resource is publicly viewable on creation
Diffstat (limited to 'tests/unit/auth/test_resources.py')
-rw-r--r--tests/unit/auth/test_resources.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/auth/test_resources.py b/tests/unit/auth/test_resources.py
index 840c008..2884add 100644
--- a/tests/unit/auth/test_resources.py
+++ b/tests/unit/auth/test_resources.py
@@ -37,7 +37,8 @@ def test_create_resource(mocker, fxtr_users_in_group, user, expected):
mocker.patch("gn3.auth.authorisation.checks.require_oauth.acquire",
conftest.get_tokeniser(user))
conn, _group, _users = fxtr_users_in_group
- resource = create_resource(conn, "test_resource", resource_category, user)
+ resource = create_resource(
+ conn, "test_resource", resource_category, user, False)
assert resource == expected
with db.cursor(conn) as cursor:
@@ -68,7 +69,7 @@ def test_create_resource_raises_for_unauthorised_users(
conn, _group, _users = fxtr_users_in_group
with pytest.raises(AuthorisationError):
assert create_resource(
- conn, "test_resource", resource_category, user) == expected
+ conn, "test_resource", resource_category, user, False) == expected
SORTKEY = lambda resource: resource.resource_id