diff options
author | Frederick Muriuki Muriithi | 2024-03-26 10:42:29 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-03-26 10:42:29 +0300 |
commit | 77af7c016749998d62b769bdd24069f511925ef9 (patch) | |
tree | 1419011d0ab1bf538f7c107b07540a91750eb63e /gn2 | |
parent | dde660453fc402b020178db41d136334a1b91b89 (diff) | |
download | genenetwork2-77af7c016749998d62b769bdd24069f511925ef9.tar.gz |
Update test function signatures and remove obsolete tests.
Diffstat (limited to 'gn2')
-rw-r--r-- | gn2/tests/unit/wqflask/test_resource_manager.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gn2/tests/unit/wqflask/test_resource_manager.py b/gn2/tests/unit/wqflask/test_resource_manager.py index d7eb0e87..d0b1d58c 100644 --- a/gn2/tests/unit/wqflask/test_resource_manager.py +++ b/gn2/tests/unit/wqflask/test_resource_manager.py @@ -58,7 +58,7 @@ class TestGetUserMembership(unittest.TestCase): class TestCheckUserAccessRole(unittest.TestCase): """Test cases for `get_highest_user_access_role`""" - def test_edit_access(self, requests_mock): + def test_edit_access(self): """Test that the right access roles are set""" response = mock.PropertyMock(return_value=json.dumps( { @@ -67,7 +67,6 @@ class TestCheckUserAccessRole(unittest.TestCase): 'admin': ['not-admin', 'edit-access', ], } )) - type(requests_mock.return_value).content = response self.assertEqual(get_highest_user_access_role( resource_id="0196d92e1665091f202f", user_id="8ad942fe-490d-453e-bd37"), @@ -75,7 +74,7 @@ class TestCheckUserAccessRole(unittest.TestCase): "metadata": DataRole.EDIT, "admin": AdminRole.EDIT_ACCESS}) - def test_no_access(self, requests_mock): + def test_no_access(self): response = mock.PropertyMock(return_value=json.dumps( { 'data': ['no-access', ], @@ -83,7 +82,6 @@ class TestCheckUserAccessRole(unittest.TestCase): 'admin': ['not-admin', ], } )) - type(requests_mock.return_value).content = response self.assertEqual(get_highest_user_access_role( resource_id="0196d92e1665091f202f", user_id=""), |