changeset 632:2084e0640775

test WADO-RS of a single instance based on study label
author Alain Mazy <am@osimis.io>
date Mon, 18 Mar 2024 11:59:10 +0100
parents 3bf3ea08efde
children 7bb22f87fc5b
files NewTests/Authorization/test_authorization.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/Authorization/test_authorization.py	Tue Mar 05 09:13:02 2024 +0100
+++ b/NewTests/Authorization/test_authorization.py	Mon Mar 18 11:59:10 2024 +0100
@@ -243,9 +243,15 @@
         o.instances.get_tags(self.label_a_instance_id)
         
         # make sure you can access a resource route with a user token (it does not throw)
-        o.get_json(f"dicom-web/studies/{self.label_a_study_dicom_id}/metadata")
+        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"))
+
+        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}"))
+
 
 
     def test_resource_token(self):