about summary refs log tree commit diff
path: root/tests/unit/auth/test_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/auth/test_resources.py')
-rw-r--r--tests/unit/auth/test_resources.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/unit/auth/test_resources.py b/tests/unit/auth/test_resources.py
index 9b45b68..04da6df 100644
--- a/tests/unit/auth/test_resources.py
+++ b/tests/unit/auth/test_resources.py
@@ -30,7 +30,7 @@ create_resource_failure = {
         (Resource(
             uuid.UUID("d32611e3-07fc-4564-b56c-786c6db6de2b"),
             "test_resource", resource_category, False),))))
-def test_create_resource(# pylint: disable=[too-many-arguments, unused-argument]
+def test_create_resource(# pylint: disable=[too-many-arguments, too-many-positional-arguments, unused-argument]
         mocker,
         fxtr_users_in_group,
         fxtr_resource_user_roles,
@@ -47,11 +47,11 @@ def test_create_resource(# pylint: disable=[too-many-arguments, unused-argument]
             user,
             tuple(client for client in clients if client.user == user)[0]))
     conn, _group, _users = fxtr_users_in_group
-    resource = create_resource(
-        conn, "test_resource", resource_category, user, False)
-    assert resource == expected
 
     with db.cursor(conn) as cursor:
+        resource = create_resource(
+            conn, "test_resource", resource_category, user, _group, False)
+        assert resource == expected
         # Cleanup
         cursor.execute(
             "DELETE FROM user_roles WHERE resource_id=?",
@@ -83,7 +83,13 @@ 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, False) == expected
+            conn,
+            "test_resource",
+            resource_category,
+            user,
+            _group,
+            False
+        ) == expected
 
 def sort_key_resources(resource):
     """Sort-key for resources."""