changeset 321:3c8c6b41eec4

dealing with Content-Location in test_frames_transcoding of DICOMweb
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 Jul 2020 10:33:53 +0200
parents 1f81f1d7d746
children 33b79d82a83c
files Plugins/DicomWeb/Run.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/DicomWeb/Run.py	Wed Jul 08 13:31:03 2020 +0200
+++ b/Plugins/DicomWeb/Run.py	Wed Jul 22 10:33:53 2020 +0200
@@ -1166,7 +1166,7 @@
             '1.2.840.10008.1.2.4.70' : 'multipart/related; type=image/jpeg; transfer-syntax=1.2.840.10008.1.2.4.70',
             }
 
-        uri = '/dicom-web%s' % UploadAndGetWadoPath('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm')
+        uri = 'dicom-web%s' % UploadAndGetWadoPath('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm')
         truth = Image.open(GetDatabasePath('TransferSyntaxes/1.2.840.10008.1.2.4.50.png'))
         
         a = DoGetMultipart(ORTHANC, '%s/frames/1' % uri,
@@ -1174,7 +1174,7 @@
                            returnHeaders = True)
         self.assertEqual(1, len(a))
         self.assertEqual(2, len(a[0]))
-        self.assertEqual('http://localhost:8042%s/frames/1' % uri,
+        self.assertEqual('%s%s/frames/1' % (ORTHANC['Url'], uri),
                          a[0][1]['Content-Location'])
         self.assertEqual(ACCEPT['1.2.840.10008.1.2.4.50'],
                          'multipart/related; type=%s' % a[0][1]['Content-Type'])
@@ -1234,14 +1234,14 @@
             self.assertEqual(RESULTS[syntax], ComputeMD5(a[0]))
 
         # Test transcoding to all the possible transfer syntaxes
-        uri = '/dicom-web%s' % UploadAndGetWadoPath('KarstenHilbertRF.dcm')
+        uri = 'dicom-web%s' % UploadAndGetWadoPath('KarstenHilbertRF.dcm')
         for syntax in ACCEPT2:
             a = DoGetMultipart(ORTHANC, '%s/frames/1' % uri,
                                headers = { 'Accept' : ACCEPT2[syntax] },
                                returnHeaders = True)
             self.assertEqual(1, len(a))
             self.assertEqual(2, len(a[0]))
-            self.assertEqual('http://localhost:8042%s/frames/1' % uri,
+            self.assertEqual('%s%s/frames/1' % (ORTHANC['Url'], uri),
                              a[0][1]['Content-Location'])
             self.assertEqual(ACCEPT[syntax],
                              'multipart/related; type=%s' % a[0][1]['Content-Type'])