changeset 633:7bb22f87fc5b

fix auth test wrt plugin version
author Alain Mazy <am@osimis.io>
date Tue, 19 Mar 2024 08:51:56 +0100
parents 2084e0640775
children f6ee256f2404
files NewTests/Authorization/test_authorization.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/Authorization/test_authorization.py	Mon Mar 18 11:59:10 2024 +0100
+++ b/NewTests/Authorization/test_authorization.py	Tue Mar 19 08:51:56 2024 +0100
@@ -246,11 +246,12 @@
         m = o.get_json(f"dicom-web/studies/{self.label_a_study_dicom_id}/metadata")
         self.assert_is_forbidden(lambda: o.get_json(f"dicom-web/studies/{self.label_b_study_dicom_id}/metadata"))
 
-        i = o.get_json(f"dicom-web/studies/{self.label_a_study_dicom_id}/instances")
-        self.assert_is_forbidden(lambda: o.get_json(f"dicom-web/studies/{self.label_b_study_dicom_id}/instances"))
+        if o.is_plugin_version_at_least("authorization", 0, 7, 1):
+            i = o.get_json(f"dicom-web/studies/{self.label_a_study_dicom_id}/instances")
+            self.assert_is_forbidden(lambda: o.get_json(f"dicom-web/studies/{self.label_b_study_dicom_id}/instances"))
 
-        i = o.get_binary(f"dicom-web/studies/{self.label_a_study_dicom_id}/series/{self.label_a_series_dicom_id}/instances/{self.label_a_instance_dicom_id}")
-        self.assert_is_forbidden(lambda: o.get_binary(f"dicom-web/studies/{self.label_b_study_dicom_id}/series/{self.label_b_series_dicom_id}/instances/{self.label_b_instance_dicom_id}"))
+            i = o.get_binary(f"dicom-web/studies/{self.label_a_study_dicom_id}/series/{self.label_a_series_dicom_id}/instances/{self.label_a_instance_dicom_id}")
+            self.assert_is_forbidden(lambda: o.get_binary(f"dicom-web/studies/{self.label_b_study_dicom_id}/series/{self.label_b_series_dicom_id}/instances/{self.label_b_instance_dicom_id}"))