# HG changeset patch # User Alain Mazy # Date 1679331968 -3600 # Node ID fb900401be28085749e292241cdf733751fb422a # Parent 17a74118d73a92051355d1b311dbb0aba53f7520 fix diff -r 17a74118d73a -r fb900401be28 Plugins/DicomWeb/Run.py --- a/Plugins/DicomWeb/Run.py Tue Mar 14 10:34:36 2023 +0100 +++ b/Plugins/DicomWeb/Run.py Mon Mar 20 18:06:08 2023 +0100 @@ -331,7 +331,7 @@ '6de73705-c4e65c1b-9d9ea1b5-cabcd8e7-f15e4285', 'c8df6478-d7794217-0f11c293-a41237c9-31d98357' ], 'Synchronous' : True }) - pprint.pprint(r) + # pprint.pprint(r) self.assertEqual(l, len(r)) self.assertEqual("ca29faea-b6a0e17f-067743a1-8b778011-a48b2a17", r['Resources']['Patients'][0]) self.assertEqual("0a9b3153-2512774b-2d9580de-1fc3dcf6-3bd83918", r['Resources']['Studies'][0]) diff -r 17a74118d73a -r fb900401be28 Tests/Tests.py --- a/Tests/Tests.py Tue Mar 14 10:34:36 2023 +0100 +++ b/Tests/Tests.py Mon Mar 20 18:06:08 2023 +0100 @@ -9201,31 +9201,32 @@ self.assertEqual(j['ID'], i['ID']) def test_storescu_custom_host_ip_port(self): - DropOrthanc(_LOCAL) - DropOrthanc(_REMOTE) - - a = UploadInstance(_REMOTE, 'Knee/T1/IM-0001-0001.dcm') - - # upload to self -> orthanctest shall not receive any content - DoPost(_REMOTE, '/modalities/self/store', { - 'Resources' : [ a['ID']] - }) - self.assertEqual(0, len(DoGet(_LOCAL, '/instances'))) - - # upload to self by overriding it with config from orthanctest -> orthanctest shall receive the content - c = DoGet(_REMOTE, '/modalities/orthanctest/configuration') - DoPost(_REMOTE, '/modalities/self/store', { - 'LocalAet' : 'YOP', - 'CalledAet' : c['AET'], - 'Port' : c['Port'], - 'Host' : c['Host'], - 'Resources' : [ a['ID']] - }) - - self.assertEqual(1, len(DoGet(_LOCAL, '/instances'))) - - DropOrthanc(_REMOTE) - DropOrthanc(_LOCAL) + if IsOrthancVersionAbove(_REMOTE, 1, 11, 3): + DropOrthanc(_LOCAL) + DropOrthanc(_REMOTE) + + a = UploadInstance(_REMOTE, 'Knee/T1/IM-0001-0001.dcm') + + # upload to self -> orthanctest shall not receive any content + DoPost(_REMOTE, '/modalities/self/store', { + 'Resources' : [ a['ID']] + }) + self.assertEqual(0, len(DoGet(_LOCAL, '/instances'))) + + # upload to self by overriding it with config from orthanctest -> orthanctest shall receive the content + c = DoGet(_REMOTE, '/modalities/orthanctest/configuration') + DoPost(_REMOTE, '/modalities/self/store', { + 'LocalAet' : 'YOP', + 'CalledAet' : c['AET'], + 'Port' : c['Port'], + 'Host' : c['Host'], + 'Resources' : [ a['ID']] + }) + + self.assertEqual(1, len(DoGet(_LOCAL, '/instances'))) + + DropOrthanc(_REMOTE) + DropOrthanc(_LOCAL) def test_rle_planar_configuration(self): # This test failed in Orthanc <= 1.11.2