From 7ec83f47daf69df38eca1bf1d273829e15179fba Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum Date: Fri, 11 Oct 2024 19:25:25 +0200 Subject: [PATCH] fix ruff violations --- tests/test_ap_set.py | 4 ++-- tests/test_doap_set.py | 4 ++-- tests/test_oap_get.py | 10 +++++----- tests/test_oap_update_iris.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_ap_set.py b/tests/test_ap_set.py index 04e2844a..48d294f3 100644 --- a/tests/test_ap_set.py +++ b/tests/test_ap_set.py @@ -9,7 +9,7 @@ from dsp_permissions_scripts.models import group -@pytest.fixture() +@pytest.fixture def create_new_ap_request() -> dict[str, Any]: return { "forGroup": "http://www.knora.org/ontology/knora-admin#Creator", @@ -21,7 +21,7 @@ def create_new_ap_request() -> dict[str, Any]: } -@pytest.fixture() +@pytest.fixture def create_new_ap_response() -> dict[str, Any]: return { "administrative_permission": { diff --git a/tests/test_doap_set.py b/tests/test_doap_set.py index 3bd5385c..673a79c8 100644 --- a/tests/test_doap_set.py +++ b/tests/test_doap_set.py @@ -10,7 +10,7 @@ from dsp_permissions_scripts.models.scope import PermissionScope -@pytest.fixture() +@pytest.fixture def create_new_doap_request() -> dict[str, Any]: return { "forGroup": "http://www.knora.org/ontology/knora-admin#KnownUser", @@ -27,7 +27,7 @@ def create_new_doap_request() -> dict[str, Any]: } -@pytest.fixture() +@pytest.fixture def create_new_doap_response() -> dict[str, Any]: return { "default_object_access_permission": { diff --git a/tests/test_oap_get.py b/tests/test_oap_get.py index 5446a4d1..5defcfe4 100644 --- a/tests/test_oap_get.py +++ b/tests/test_oap_get.py @@ -20,7 +20,7 @@ from dsp_permissions_scripts.utils.dsp_client import DspClient -@pytest.fixture() +@pytest.fixture def resource() -> dict[str, Any]: return { "@id": "http://rdfh.ch/0838/dBu563hjSN6RmJZp6NU3_Q", @@ -39,7 +39,7 @@ def resource() -> dict[str, Any]: } -@pytest.fixture() +@pytest.fixture def gravsearch_1_link_obj() -> dict[str, Any]: return { "knora-api:hasPermissions": "CR knora-admin:ProjectAdmin|D knora-admin:ProjectMember", @@ -48,7 +48,7 @@ def gravsearch_1_link_obj() -> dict[str, Any]: } -@pytest.fixture() +@pytest.fixture def gravsearch_4_link_objs_on_2_pages() -> list[dict[str, Any]]: page_1 = { "@graph": [ @@ -82,7 +82,7 @@ def gravsearch_4_link_objs_on_2_pages() -> list[dict[str, Any]]: return [page_1, page_2] -@pytest.fixture() +@pytest.fixture def video_segment() -> dict[str, Any]: # https://ark.stage.dasch.swiss/ark:/72163/1/0812/l32ehsHuTfaQAKVTRiuBRAR return { "knora-api:hasSegmentBounds": { @@ -126,7 +126,7 @@ def video_segment() -> dict[str, Any]: # https://ark.stage.dasch.swiss/ark:/721 } -@pytest.fixture() +@pytest.fixture def linkobj() -> dict[str, Any]: # https://app.test.dasch.swiss/resource/F18E/Os_5VvgkSC2saUlSUdcLhA return { "knora-api:hasPermissions": "CR knora-admin:ProjectAdmin|V knora-admin:KnownUser", diff --git a/tests/test_oap_update_iris.py b/tests/test_oap_update_iris.py index d78988da..64d58fa6 100644 --- a/tests/test_oap_update_iris.py +++ b/tests/test_oap_update_iris.py @@ -15,7 +15,7 @@ from dsp_permissions_scripts.utils.dsp_client import DspClient -@pytest.fixture() +@pytest.fixture def res_dict_2_props() -> dict[str, Any]: return { "knora-api:lastModificationDate": {"@value": "2024-09-10T18:07:10.753289758Z", "@type": "xsd:dateTimeStamp"}, @@ -40,7 +40,7 @@ def res_dict_2_props() -> dict[str, Any]: } -@pytest.fixture() +@pytest.fixture def res_dict_2_vals() -> dict[str, Any]: return { "knora-api:lastModificationDate": {"@value": "2024-09-10T18:07:10.753289758Z", "@type": "xsd:dateTimeStamp"},