changeset 575:28fef24147fa

test for new DicomWeb cache
author Alain Mazy <am@osimis.io>
date Wed, 06 Sep 2023 17:03:54 +0200
parents ee71526e11ed
children 80ba6f1d521c
files Plugins/DicomWeb/Run.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/DicomWeb/Run.py	Mon Aug 14 10:19:50 2023 +0200
+++ b/Plugins/DicomWeb/Run.py	Wed Sep 06 17:03:54 2023 +0200
@@ -42,6 +42,7 @@
 import sys
 import unittest
 import xml.dom.minidom
+import time
 from PIL import ImageChops
 from io import BytesIO
 from DicomWeb import *
@@ -1693,6 +1694,17 @@
             self.assertIn("https://my-domain/dicom-web", m[0][u'7FE00010']['BulkDataURI'])
 
 
+    def test_full_mode_cache(self):
+        study = UploadInstance(ORTHANC, 'ColorTestImageJ.dcm')['ParentStudy']
+        studyId = DoGet(ORTHANC, '/studies/%s' % study)['MainDicomTags']['StudyInstanceUID']
+        
+        # wait for the StableSeries to happen to pre-compute the series/metadata
+        time.sleep(4)
+
+        m = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % studyId)
+        self.assertIn(ORTHANC['Url'], m[0][u'7FE00010']['BulkDataURI'])
+
+
     def test_issue_216(self):
         study = UploadInstance(ORTHANC, 'ColorTestImageJ.dcm')['ParentStudy']
         studyUid = DoGet(ORTHANC, '/studies/%s' % study)['MainDicomTags']['StudyInstanceUID']