aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_roles.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-08-07 07:19:16 +0300
committerFrederick Muriuki Muriithi2023-08-07 09:26:11 +0300
commitc9f35e54d5d894051ceb446d1dce54915dcb20f6 (patch)
treec2bfc7bd6b7feab4b7418770f05e7d6ab43623da /tests/unit/auth/test_roles.py
parentb7f5cd0d788748559ca5e9768f3ea35d45442ef6 (diff)
downloadgn-auth-c9f35e54d5d894051ceb446d1dce54915dcb20f6.tar.gz
Update module name/path
Change from gn3 to gn_auth
Diffstat (limited to 'tests/unit/auth/test_roles.py')
-rw-r--r--tests/unit/auth/test_roles.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/auth/test_roles.py b/tests/unit/auth/test_roles.py
index 02fd9f7..31d5e8e 100644
--- a/tests/unit/auth/test_roles.py
+++ b/tests/unit/auth/test_roles.py
@@ -3,10 +3,10 @@ import uuid
import pytest
-from gn3.auth import db
-from gn3.auth.authorisation.privileges import Privilege
-from gn3.auth.authorisation.errors import AuthorisationError
-from gn3.auth.authorisation.roles.models import Role, user_roles, create_role
+from gn_auth.auth import db
+from gn_auth.auth.authorisation.privileges import Privilege
+from gn_auth.auth.authorisation.errors import AuthorisationError
+from gn_auth.auth.authorisation.roles.models import Role, user_roles, create_role
from tests.unit.auth import conftest
from tests.unit.auth.fixtures import TEST_USERS
@@ -36,8 +36,8 @@ def test_create_role(# pylint: disable=[too-many-arguments]
THEN: verify they are only able to create the role if they have the
appropriate privileges
"""
- mocker.patch("gn3.auth.authorisation.roles.models.uuid4", uuid_fn)
- mocker.patch("gn3.auth.authorisation.checks.require_oauth.acquire",
+ mocker.patch("gn_auth.auth.authorisation.roles.models.uuid4", uuid_fn)
+ mocker.patch("gn_auth.auth.authorisation.checks.require_oauth.acquire",
conftest.get_tokeniser(user))
with db.connection(auth_testdb_path) as conn, db.cursor(conn) as cursor:
the_role = create_role(cursor, "a_test_role", PRIVILEGES)
@@ -55,8 +55,8 @@ def test_create_role_raises_exception_for_unauthorised_users(# pylint: disable=[
THEN: verify they are only able to create the role if they have the
appropriate privileges
"""
- mocker.patch("gn3.auth.authorisation.roles.models.uuid4", uuid_fn)
- mocker.patch("gn3.auth.authorisation.checks.require_oauth.acquire",
+ mocker.patch("gn_auth.auth.authorisation.roles.models.uuid4", uuid_fn)
+ mocker.patch("gn_auth.auth.authorisation.checks.require_oauth.acquire",
conftest.get_tokeniser(user))
with db.connection(auth_testdb_path) as conn, db.cursor(conn) as cursor:
with pytest.raises(AuthorisationError):