comparison Tests/Tests.py @ 372:e9b03d8f3b78

fix for DCMTK 3.6.6
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 Jan 2021 09:16:18 +0100
parents 24d93b42873a
children f673153f27a4
comparison
equal deleted inserted replaced
371:6941a4f449cc 372:e9b03d8f3b78
2946 t = DoGet(_REMOTE, '/instances/%s/tags?simplify' % j) 2946 t = DoGet(_REMOTE, '/instances/%s/tags?simplify' % j)
2947 with open(GetDatabasePath('PrivateTagsSimplify.json'), 'r') as f: 2947 with open(GetDatabasePath('PrivateTagsSimplify.json'), 'r') as f:
2948 self.assertTrue(CompareTags(t, json.loads(f.read()), [ 2948 self.assertTrue(CompareTags(t, json.loads(f.read()), [
2949 ])) 2949 ]))
2950 2950
2951
2952 # NB: To get the actual value of the "tags" JSON file, use the
2953 # following command:
2954 # $ curl http://alice:orthanctest@localhost:8042/instances/d29ead49-43e8601d-72f1e922-7de676ee-ea77c2b4/tags
2951 t = DoGet(_REMOTE, '/instances/%s/tags' % j) 2955 t = DoGet(_REMOTE, '/instances/%s/tags' % j)
2952 with open(GetDatabasePath('PrivateTagsFull.json'), 'r') as f: 2956 with open(GetDatabasePath('PrivateTagsFull.json'), 'r') as f:
2953 a = json.loads(f.read()) 2957 a = json.loads(f.read())
2954 aa = json.dumps(a).replace('2e+022', '2e+22') 2958 aa = json.dumps(a).replace('2e+022', '2e+22')
2955 tt = json.dumps(t).replace('2e+022', '2e+22') 2959 tt = (json.dumps(t)
2960 .replace('2e+022', '2e+22')
2961 # The "IllegalPrivatePixelSequence" tag was introduced in DCMTK 3.6.6 dictionary
2962 .replace('IllegalPrivatePixelSequence', 'Unknown Tag & Data'))
2956 self.assertEqual(aa, tt) 2963 self.assertEqual(aa, tt)
2957 2964
2958 2965
2959 def test_batch_archive(self): 2966 def test_batch_archive(self):
2960 UploadInstance(_REMOTE, 'Knee/T1/IM-0001-0001.dcm') 2967 UploadInstance(_REMOTE, 'Knee/T1/IM-0001-0001.dcm')