comparison Tests/Tests.py @ 70:9e7b5809481f Orthanc-1.0.0

test range search
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 11 Dec 2015 15:59:17 +0100
parents 83fd88230097
children 48740070cbf1 97acfdf0dbce
comparison
equal deleted inserted replaced
69:83fd88230097 70:9e7b5809481f
1071 1071
1072 # Test returning sequence values (only since Orthanc 0.9.5) 1072 # Test returning sequence values (only since Orthanc 0.9.5)
1073 i = CallFindScu([ '-k', '0008,0052=SERIES', '-k', '0008,2112' ]) # "ColorTestImageJ" has this sequence tag 1073 i = CallFindScu([ '-k', '0008,0052=SERIES', '-k', '0008,2112' ]) # "ColorTestImageJ" has this sequence tag
1074 sequences = re.findall('\(0008,2112\)', i) 1074 sequences = re.findall('\(0008,2112\)', i)
1075 self.assertEqual(1, len(sequences)) 1075 self.assertEqual(1, len(sequences))
1076
1077 # Test range search (buggy if Orthanc <= 0.9.6)
1078 i = CallFindScu([ '-k', '0008,0052=STUDY', '-k', 'StudyDate=19980312-' ])
1079 studies = re.findall('\(0008,0020\).*?\[\s*(.*?)\s*\]', i)
1080 self.assertEqual(2, len(studies))
1081 self.assertTrue('20070208' in studies)
1082 self.assertTrue('19980312' in studies)
1083 i = CallFindScu([ '-k', '0008,0052=STUDY', '-k', 'StudyDate=19980312-19980312' ])
1084 studies = re.findall('\(0008,0020\).*?\[\s*(.*?)\s*\]', i)
1085 self.assertEqual(1, len(studies))
1086 self.assertTrue('19980312' in studies)
1087 i = CallFindScu([ '-k', '0008,0052=STUDY', '-k', 'StudyDate=-19980312' ])
1088 studies = re.findall('\(0008,0020\).*?\[\s*(.*?)\s*\]', i)
1089 self.assertEqual(1, len(studies))
1090 self.assertTrue('19980312' in studies)
1076 1091
1077 1092
1078 def test_incoming_movescu(self): 1093 def test_incoming_movescu(self):
1079 UploadInstance(_REMOTE, 'Multiframe.dcm') 1094 UploadInstance(_REMOTE, 'Multiframe.dcm')
1080 1095