Skip to content

Commit

Permalink
DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 22, 2024
1 parent efc1ef1 commit 83a2062
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_scope_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,9 @@ def test_create_string_from_scope(self) -> None:
for perm_string, scope in zip(self.perm_strings, self.scopes):
assert create_string_from_scope(scope) == perm_string, f"Failed with permission string '{perm_string}'"

def test_create_admin_route_object_from_scope(self) -> None:
get_response = {
"groups": [{"id": CUSTOM_GROUP_FULL_IRI, "name": CUSTOM_GROUP_NAME, "project": {"shortname": SHORTNAME}}]
}
dsp_client_mock = Mock(spec=DspClient, get=Mock(return_value=get_response))
def test_create_admin_route_object_from_scope(self, dsp_client: DspClient) -> None:
for admin_route_object, scope, index in zip(self.admin_route_objects, self.scopes, range(len(self.scopes))):
returned = create_admin_route_object_from_scope(scope, dsp_client_mock)
returned = create_admin_route_object_from_scope(scope, dsp_client)
assert unordered(returned) == admin_route_object, f"Failed with admin group object no. {index}"


Expand Down

0 comments on commit 83a2062

Please sign in to comment.