Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 406:62ee5e57ee05
test_anonymize_relationships_6
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Jun 2021 17:31:13 +0200 |
parents | 6bbc89c2c2d1 |
children | ad98466353c6 |
comparison
equal
deleted
inserted
replaced
405:6bbc89c2c2d1 | 406:62ee5e57ee05 |
---|---|
7069 self.assertEqual('HELLO^D', t['3006,0002']) | 7069 self.assertEqual('HELLO^D', t['3006,0002']) |
7070 | 7070 |
7071 for t in [ tags2021b, tagsDefault ]: | 7071 for t in [ tags2021b, tagsDefault ]: |
7072 self.assertFalse('0050,0020' in t) # Device Description, anonymized between 2017c and 2019c | 7072 self.assertFalse('0050,0020' in t) # Device Description, anonymized between 2017c and 2019c |
7073 self.assertEqual('', t['3006,0002']) # StructureSetLabel, anonymized between 2019c and 2021b | 7073 self.assertEqual('', t['3006,0002']) # StructureSetLabel, anonymized between 2019c and 2021b |
7074 | |
7075 | |
7076 def test_anonymize_relationships_6(self): | |
7077 # 2020-10-20 (Salim Kanoun): "I think I have hit an | |
7078 # anonymization issue for the tag 0008,1250. This tags is a | |
7079 # sequence containing StudyUID / Series UID of related series. | |
7080 # [After anonymization,] this tag keep a reference of the | |
7081 # original Study/Series UID. | |
7082 # https://groups.google.com/g/orthanc-users/c/T0IokiActrI/m/L9K0vfscAAAJ | |
7083 UploadInstance(_REMOTE, '2020-11-16-SalimKanounAnonymization.dcm') | |
7084 | |
7085 tags = DoGet(_REMOTE, '/instances/%s/tags?short' % DoGet(_REMOTE, '/instances') [0]) | |
7086 self.assertEqual('1.2.840.113619.6.95.31.0.3.4.1.3175.13.6054282', | |
7087 tags['0008,1250'][0]['0020,000d']) | |
7088 self.assertEqual('1.3.12.2.1107.5.1.4.11047.30000019111306043635400005028', | |
7089 tags['0008,1250'][0]['0020,000e']) | |
7090 | |
7091 a = DoGet(_REMOTE, '/studies') | |
7092 self.assertEqual(1, len(a)) | |
7093 b = DoPost(_REMOTE, '/studies/%s/anonymize' % a[0], {}) ['ID'] | |
7094 | |
7095 c = DoGet(_REMOTE, '/studies/%s/instances' % b) | |
7096 self.assertEqual(1, len(c)) | |
7097 tags = DoGet(_REMOTE, '/instances/%s/tags?short' % c[0]['ID']) | |
7098 | |
7099 # In Orthanc <= 1.9.3, the two tests below failed | |
7100 self.assertNotEqual('1.2.840.113619.6.95.31.0.3.4.1.3175.13.6054282', | |
7101 tags['0008,1250'][0]['0020,000d']) | |
7102 self.assertNotEqual('1.3.12.2.1107.5.1.4.11047.30000019111306043635400005028', | |
7103 tags['0008,1250'][0]['0020,000e']) |