aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_roles.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-02-02 11:35:51 +0300
committerFrederick Muriuki Muriithi2023-02-02 12:03:51 +0300
commitdfe5eb18e3ec8dc570d118bfe95c5d4dcb2c7575 (patch)
treeb45da1e9eba405042ef47174215b827739f5a393 /tests/unit/auth/test_roles.py
parent6fc120aca6062f96725adaece85a7b76000affda (diff)
downloadgenenetwork3-dfe5eb18e3ec8dc570d118bfe95c5d4dcb2c7575.tar.gz
auth: Reorganise modules/packages for easier dev and maintenance
Split the views/routes into separate modules each dealing with a narrower scope of the application to aid in maintenance, and help with making the development easier.
Diffstat (limited to 'tests/unit/auth/test_roles.py')
-rw-r--r--tests/unit/auth/test_roles.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/auth/test_roles.py b/tests/unit/auth/test_roles.py
index 78ff8a6..9152042 100644
--- a/tests/unit/auth/test_roles.py
+++ b/tests/unit/auth/test_roles.py
@@ -6,7 +6,7 @@ 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 import Role, user_roles, create_role
+from gn3.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,7 +36,7 @@ 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.uuid4", uuid_fn)
+ mocker.patch("gn3.auth.authorisation.roles.models.uuid4", uuid_fn)
with fxtr_app.app_context() as flask_context:
flask_context.g.user = user
with db.connection(auth_testdb_path) as conn, db.cursor(conn) as cursor:
@@ -55,7 +55,7 @@ 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.uuid4", uuid_fn)
+ mocker.patch("gn3.auth.authorisation.roles.models.uuid4", uuid_fn)
with fxtr_app.app_context() as flask_context:
flask_context.g.user = user
with db.connection(auth_testdb_path) as conn, db.cursor(conn) as cursor: