aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests
diff options
context:
space:
mode:
authorBonfaceKilz2021-11-01 09:22:23 +0300
committerBonfaceKilz2021-11-04 15:22:41 +0300
commitb3a9b90343f70584b82df00a42cbcc5b97dbfc7f (patch)
tree82eb71266cceef38168d64b84d84201f91ede28b /wqflask/tests
parent4d676728786c18ff10048f15613b8fe9b66a7edc (diff)
downloadgenenetwork2-b3a9b90343f70584b82df00a42cbcc5b97dbfc7f.tar.gz
use gn3 imports
Diffstat (limited to 'wqflask/tests')
-rw-r--r--wqflask/tests/unit/wqflask/test_resource_manager.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/wqflask/tests/unit/wqflask/test_resource_manager.py b/wqflask/tests/unit/wqflask/test_resource_manager.py
index 01fb2021..f4335425 100644
--- a/wqflask/tests/unit/wqflask/test_resource_manager.py
+++ b/wqflask/tests/unit/wqflask/test_resource_manager.py
@@ -3,10 +3,10 @@ import json
import unittest
from unittest import mock
-from wqflask.resource_manager import get_user_membership
-from wqflask.resource_manager import get_user_access_roles
-from wqflask.resource_manager import DataRole
-from wqflask.resource_manager import AdminRole
+from gn3.authentication import get_user_membership
+from gn3.authentication import get_highest_user_access_role
+from gn3.authentication import DataRole
+from gn3.authentication import AdminRole
class TestGetUserMembership(unittest.TestCase):
@@ -56,7 +56,7 @@ class TestGetUserMembership(unittest.TestCase):
class TestCheckUserAccessRole(unittest.TestCase):
- """Test cases for `get_user_access_roles`"""
+ """Test cases for `get_highest_user_access_role`"""
@mock.patch("wqflask.resource_manager.requests.get")
def test_edit_access(self, requests_mock):
@@ -69,7 +69,7 @@ class TestCheckUserAccessRole(unittest.TestCase):
}
))
type(requests_mock.return_value).content = response
- self.assertEqual(get_user_access_roles(
+ self.assertEqual(get_highest_user_access_role(
resource_id="0196d92e1665091f202f",
user_id="8ad942fe-490d-453e-bd37"),
{"data": DataRole.EDIT,
@@ -86,7 +86,7 @@ class TestCheckUserAccessRole(unittest.TestCase):
}
))
type(requests_mock.return_value).content = response
- self.assertEqual(get_user_access_roles(
+ self.assertEqual(get_highest_user_access_role(
resource_id="0196d92e1665091f202f",
user_id=""),
{"data": DataRole.NO_ACCESS,