aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_roles.py
diff options
context:
space:
mode:
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):