Mercurial > hg > orthanc-tests
changeset 510:fb900401be28
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 20 Mar 2023 18:06:08 +0100 |
parents | 17a74118d73a |
children | 933fe1bbce4f |
files | Plugins/DicomWeb/Run.py Tests/Tests.py |
diffstat | 2 files changed, 27 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- 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])
--- 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