changeset 266:b105bb2233c6

author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Feb 2020 21:44:28 +0100
parents 8d63d035b837
children f30b5bfa9599
files Tests/Tests.py
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Tue Feb 25 13:57:59 2020 +0100
+++ b/Tests/Tests.py	Tue Feb 25 21:44:28 2020 +0100
@@ -2599,7 +2599,8 @@
 
         i = DoPost(_REMOTE, '/tools/create-dicom',
                    json.dumps({
-                       'Tags' : tags
+                       'Tags' : tags,
+                       'PrivateCreator' : 'TestBinary',
                    }))
 
         self.assertEqual('Jodogne', DoGet(_REMOTE, '/instances/%s/content/PatientName' % i['ID']).strip())
@@ -2608,7 +2609,8 @@
         i = DoPost(_REMOTE, '/tools/create-dicom',
                    json.dumps({
                        'InterpretBinaryTags' : False,
-                       'Tags' : tags
+                       'Tags' : tags,
+                       'PrivateCreator' : 'TestBinary',
                    }))
 
         self.assertEqual('Jodogne', DoGet(_REMOTE, '/instances/%s/content/PatientName' % i['ID']).strip())
@@ -4772,14 +4774,16 @@
         self.assertEqual("1.2.3.4", aRtTags['ReferencedFrameOfReferenceSequence'][0]['RTReferencedStudySequence'][0]['ReferencedSOPInstanceUID'])
         
 
-
-    @unittest.skip('Not fixed yet in Orthanc')
     def test_bitbucket_issue_140(self):
+        # "Modifying private tags with REST API changes VR from LO to
+        # UN." This test fails if DCMTK <= 3.6.0.
+        # https://bitbucket.org/sjodogne/orthanc/issues/140
         source = UploadInstance(_REMOTE, 'Issue140.dcm') ['ID']
         series = DoGet(_REMOTE, '/instances/%s' % source) ['ParentSeries']
 
         target = DoPost(_REMOTE, '/series/%s/modify' % series, {
-            'Replace' : { 'RadioButton3' : 'aaabbbccc' }
+            'Replace' : { 'RadioButton3' : 'aaabbbccc' },
+            'PrivateCreator' : 'RadioLogic',  # <= the trick is here
         }, 'application/json') ['ID']
 
         instances = DoGet(_REMOTE, '/series/%s/instances' % target)