# HG changeset patch # User Alain Mazy # Date 1694012634 -7200 # Node ID 28fef24147fa615a23e71be7f28501601ddeb05d # Parent ee71526e11ed0c35513d6653de77479204de6f5f test for new DicomWeb cache diff -r ee71526e11ed -r 28fef24147fa Plugins/DicomWeb/Run.py --- 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']