diff Tests/Tests.py @ 23:30ecc857fa07

test latin-2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 23 Jun 2015 13:49:53 +0200
parents 8f4b70c89467
children 040f6ef1394a
line wrap: on
line diff
--- a/Tests/Tests.py	Mon Jun 22 16:29:08 2015 +0200
+++ b/Tests/Tests.py	Tue Jun 23 13:49:53 2015 +0200
@@ -1980,6 +1980,15 @@
 
 
     def test_encodings(self):
+        # Latin-1 (ISO_IR 100)
         brainix = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0001.dcm')['ID']
         tags = DoGet(_REMOTE, '/instances/%s/tags?simplify' % brainix)
         self.assertEqual(u'IRM cérébrale, neuro-crâne', tags['StudyDescription'])
+
+        # Latin-2 (ISO_IR 101)
+        a = UploadInstance(_REMOTE, 'MarekLatin2.dcm')['ID']
+        i = DoGet(_REMOTE, '/instances/%s/simplified-tags' % a)
+        # dcm2xml MarekLatin2.dcm | iconv -f latin2 -t utf-8 | xmllint --format -
+        self.assertEqual('Imię i Nazwisko osoby opisującej', 
+                         i['ContentSequence'][4]['ConceptNameCodeSequence'][0]['CodeMeaning'].encode('utf-8'))
+