diff Tests/Tests.py @ 55:a395fd51cc4f

test_dicom_to_json
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 21 Oct 2015 16:11:43 +0200
parents c5f8a6b0d85e
children 1059b8de42de
line wrap: on
line diff
--- a/Tests/Tests.py	Tue Oct 20 11:21:24 2015 +0200
+++ b/Tests/Tests.py	Wed Oct 21 16:11:43 2015 +0200
@@ -2466,3 +2466,14 @@
         CallMoveScu([ '--study', '-k', '0008,0052=STUDY', '-k', 'AccessionNumber=A10003245599' ])
         self.assertEqual(1, len(DoGet(_LOCAL, '/patients')))
 
+
+    def test_dicom_to_json(self):
+        i = UploadInstance(_REMOTE, 'PrivateMDNTags.dcm')['ID']
+
+        t = DoGet(_REMOTE, '/instances/%s/tags' % i)
+        with open(GetDatabasePath('PrivateMDNTagsFull.json'), 'r') as f:
+            self.assertEqual(json.loads(f.read()), t)
+
+        t = DoGet(_REMOTE, '/instances/%s/tags?simplify' % i)
+        with open(GetDatabasePath('PrivateMDNTagsSimplify.json'), 'r') as f:
+            self.assertEqual(json.loads(f.read()), t)