From 8593d882ed1eea226eeefabaa66135df2374746f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 25 May 2023 06:02:38 +0300 Subject: Set whether resource is publicly viewable on creation --- tests/unit/auth/test_resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/unit/auth/test_resources.py') 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 -- cgit v1.2.3