Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 243:cccf697a4e13
test_bitbucket_issue_141
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 15 Jun 2019 09:46:29 +0200 |
parents | 21aa666c8fa0 |
children | 1abdab0ba0e6 |
comparison
equal
deleted
inserted
replaced
242:c6ffdd0ea04b | 243:cccf697a4e13 |
---|---|
4718 _REMOTE, '/modalities/self/query', { | 4718 _REMOTE, '/modalities/self/query', { |
4719 'Level' : 'Instance', | 4719 'Level' : 'Instance', |
4720 'Query' : { 'Rows' : '*' }, # Out-of-range value | 4720 'Query' : { 'Rows' : '*' }, # Out-of-range value |
4721 'Normalize' : False | 4721 'Normalize' : False |
4722 })) | 4722 })) |
4723 | |
4724 | |
4725 def test_bitbucket_issue_141(self): | |
4726 # https://bitbucket.org/sjodogne/orthanc/issues/141/ | |
4727 a = UploadInstance(_REMOTE, 'Issue141.dcm') ['ID'] | |
4728 study = '494c8037-b237f263-d8f15075-c8cb2280-daf39bd1' | |
4729 | |
4730 with open(GetDatabasePath('HelloWorld.pdf'), 'rb') as f: | |
4731 pdf = f.read() | |
4732 | |
4733 b = DoPost(_REMOTE, '/tools/create-dicom', { | |
4734 'Parent' : study, | |
4735 'Tags' : {}, | |
4736 'Content' : 'data:application/pdf;base64,' + base64.b64encode(pdf) | |
4737 }) ['ID'] | |
4738 | |
4739 tagsA = DoGet(_REMOTE, '/instances/%s/tags?short' % a) | |
4740 tagsB = DoGet(_REMOTE, '/instances/%s/tags?short' % b) | |
4741 self.assertEqual(tagsA['0008,0005'], tagsB['0008,0005']) | |
4742 self.assertEqual(tagsA['0008,1030'], tagsB['0008,1030']) |