# HG changeset patch # User Sebastien Jodogne # Date 1560584789 -7200 # Node ID cccf697a4e13da02cb7d0dd3dd3f69085f55756a # Parent c6ffdd0ea04b689921880cec80074497dfa9768c test_bitbucket_issue_141 diff -r c6ffdd0ea04b -r cccf697a4e13 Database/Issue141.dcm Binary file Database/Issue141.dcm has changed diff -r c6ffdd0ea04b -r cccf697a4e13 Tests/Tests.py --- a/Tests/Tests.py Thu Jun 13 09:27:44 2019 +0200 +++ b/Tests/Tests.py Sat Jun 15 09:46:29 2019 +0200 @@ -4720,3 +4720,23 @@ 'Query' : { 'Rows' : '*' }, # Out-of-range value 'Normalize' : False })) + + + def test_bitbucket_issue_141(self): + # https://bitbucket.org/sjodogne/orthanc/issues/141/ + a = UploadInstance(_REMOTE, 'Issue141.dcm') ['ID'] + study = '494c8037-b237f263-d8f15075-c8cb2280-daf39bd1' + + with open(GetDatabasePath('HelloWorld.pdf'), 'rb') as f: + pdf = f.read() + + b = DoPost(_REMOTE, '/tools/create-dicom', { + 'Parent' : study, + 'Tags' : {}, + 'Content' : 'data:application/pdf;base64,' + base64.b64encode(pdf) + }) ['ID'] + + tagsA = DoGet(_REMOTE, '/instances/%s/tags?short' % a) + tagsB = DoGet(_REMOTE, '/instances/%s/tags?short' % b) + self.assertEqual(tagsA['0008,0005'], tagsB['0008,0005']) + self.assertEqual(tagsA['0008,1030'], tagsB['0008,1030'])