changeset 625:78314ab6fc67

updated tests for auth plugin
author Alain Mazy <am@osimis.io>
date Thu, 15 Feb 2024 16:24:59 +0100
parents 543e372d2265
children 9c295b8dac00
files NewTests/Authorization/test_authorization.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/Authorization/test_authorization.py	Wed Feb 14 11:25:40 2024 +0100
+++ b/NewTests/Authorization/test_authorization.py	Thu Feb 15 16:24:59 2024 +0100
@@ -242,8 +242,9 @@
         o.series.get_tags(self.label_a_series_id)
         o.instances.get_tags(self.label_a_instance_id)
         
-        # right now, a user token can not access the dicom-web routes, only a resource token can
-        self.assert_is_forbidden(lambda: o.get_json(f"dicom-web/studies/{self.label_a_study_dicom_id}/metadata"))
+        # 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")
+        self.assert_is_forbidden(lambda: o.get_json(f"dicom-web/studies/{self.label_b_study_dicom_id}/metadata"))