From 2ae145f255e3823ac6c0bbaecff7289f5480d3e2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 20 Jun 2024 15:48:07 -0500 Subject: Move deactivated tests to module where they will be re-implemented --- tests/unit/auth/test_roles.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'tests/unit/auth/test_roles.py') diff --git a/tests/unit/auth/test_roles.py b/tests/unit/auth/test_roles.py index b9d1183..251defb 100644 --- a/tests/unit/auth/test_roles.py +++ b/tests/unit/auth/test_roles.py @@ -22,40 +22,6 @@ PRIVILEGES = ( Privilege("group:resource:edit-resource", "edit/update a resource")) -@pytest.mark.skip( - "This needs to be replaced by tests for creation of resource roles.") -@pytest.mark.unit_test -@pytest.mark.parametrize( - "user,expected", tuple(zip(conftest.TEST_USERS[0:1], ( - Role(UUID("d32611e3-07fc-4564-b56c-786c6db6de2b"), "a_test_role", - True, PRIVILEGES),)))) -def test_create_role(# pylint: disable=[too-many-arguments, unused-argument] - fxtr_app, - auth_testdb_path, - mocker, - fxtr_users, - fxtr_oauth2_clients, - user, - expected -): - """ - GIVEN: an authenticated user - WHEN: the user attempts to create a role - THEN: verify they are only able to create the role if they have the - appropriate privileges - """ - _conn, clients = fxtr_oauth2_clients - mocker.patch("gn_auth.auth.authorisation.roles.models.uuid4", conftest.uuid_fn) - mocker.patch( - "gn_auth.auth.authorisation.checks.require_oauth.acquire", - conftest.get_tokeniser( - user, - tuple(client for client in clients if client.user == user)[0])) - with db.connection(auth_testdb_path) as conn, db.cursor(conn) as cursor: - the_role = create_role(cursor, "a_test_role", PRIVILEGES) - assert the_role == expected - - @pytest.mark.unit_test @pytest.mark.parametrize( "user,expected", tuple(zip(conftest.TEST_USERS[1:], ( -- cgit v1.2.3