changeset 235:9929e4af2b7a

test_bitbucket_issue_140
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 May 2019 15:23:19 +0200
parents 93cd4fdd4a67
children 2de1aec255ae
files Database/Issue140.dcm GenerateConfigurationForTests.py Tests/Tests.py
diffstat 3 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
Binary file Database/Issue140.dcm has changed
--- a/GenerateConfigurationForTests.py	Fri Apr 05 17:04:37 2019 +0200
+++ b/GenerateConfigurationForTests.py	Mon May 06 15:23:19 2019 +0200
@@ -135,7 +135,8 @@
 
 config['Dictionary'] = {
     '00e1,10c2' : [ 'UI', 'PET-CT Multi Modality Name', 1, 1, 'ELSCINT1' ],
-    '7053,1003' : [ 'ST', 'Original Image Filename', 1, 1, 'Philips PET Private Group' ]
+    '7053,1003' : [ 'ST', 'Original Image Filename', 1, 1, 'Philips PET Private Group' ],
+    '4321,1012' : [ 'LO', 'RadioButton3', 1, 1, 'RadioLogic' ],  # For issue 140
 }
 
 config['DicomWeb'] = {
--- a/Tests/Tests.py	Fri Apr 05 17:04:37 2019 +0200
+++ b/Tests/Tests.py	Mon May 06 15:23:19 2019 +0200
@@ -4640,3 +4640,30 @@
         # This fails on Orthanc <= 1.5.6
         self.assertEqual(tags['0008,1115'][0]['0020,000e'],
                          cr[0]['MainDicomTags']['SeriesInstanceUID'])
+
+
+    @unittest.skip('Not fixed yet in Orthanc')
+    def test_bitbucket_issue_140(self):
+        source = UploadInstance(_REMOTE, 'Issue140.dcm') ['ID']
+        series = DoGet(_REMOTE, '/instances/%s' % source) ['ParentSeries']
+
+        target = DoPost(_REMOTE, '/series/%s/modify' % series, {
+            'Replace' : { 'RadioButton3' : 'aaabbbccc' }
+        }, 'application/json') ['ID']
+
+        instances = DoGet(_REMOTE, '/series/%s/instances' % target)
+        self.assertEqual(1, len(instances))
+
+        tags = DoGet(_REMOTE, '/instances/%s/tags' % source)
+        t = tags['4321,1012']
+        self.assertEqual('String', t['Type'])
+        self.assertEqual('RadioButton3', t['Name'])
+        self.assertEqual('RadioLogic', t['PrivateCreator'])
+        self.assertEqual('jklmopq', t['Value'])
+
+        tags = DoGet(_REMOTE, '/instances/%s/tags' % instances[0]['ID'])
+        t = tags['4321,1012']
+        self.assertEqual('String', t['Type'])
+        self.assertEqual('RadioButton3', t['Name'])
+        self.assertEqual('RadioLogic', t['PrivateCreator'])
+        self.assertEqual('aaabbbccc', t['Value'])