From 83a2062bd277f4f325c6fb47c1b7513f57703c46 Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum Date: Tue, 22 Oct 2024 20:45:22 +0200 Subject: [PATCH] DRY --- tests/test_scope_serialization.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/test_scope_serialization.py b/tests/test_scope_serialization.py index e7c2d98..4f1079b 100644 --- a/tests/test_scope_serialization.py +++ b/tests/test_scope_serialization.py @@ -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}"