comparison Tests/Tests.py @ 210:2c50c8f340c2

test_rest_modalities_in_study
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 Jan 2019 17:39:24 +0100
parents 2444c9a7c422
children a05cc24f84e5
comparison
equal deleted inserted replaced
209:c157b2fff551 210:2c50c8f340c2
4347 # the tag to be added to the *answer*. The tag should not used 4347 # the tag to be added to the *answer*. The tag should not used
4348 # as a filter in such a situation. 4348 # as a filter in such a situation.
4349 self.assertEqual(1, CountDicomResults('PatientSex')) 4349 self.assertEqual(1, CountDicomResults('PatientSex'))
4350 self.assertEqual(1, CountDicomResults('PatientSex=')) 4350 self.assertEqual(1, CountDicomResults('PatientSex='))
4351 self.assertEqual(1, CountRestResults('')) # This check fails on Orthanc <= 1.5.2 (issue 90) 4351 self.assertEqual(1, CountRestResults('')) # This check fails on Orthanc <= 1.5.2 (issue 90)
4352
4353
4354 def test_rest_modalities_in_study(self):
4355 # Tests a regression that is present in Orthanc 1.5.2 and 1.5.3
4356 # https://groups.google.com/d/msg/orthanc-users/7lZyG3wpx-M/uOXzAzVCFwAJ
4357 UploadInstance(_REMOTE, 'ColorTestImageJ.dcm')
4358
4359 a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
4360 'Query' : { 'ModalitiesInStudy' : 'US' }})
4361 self.assertEqual(0, len(a))
4362
4363 a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
4364 'Query' : { 'ModalitiesInStudy' : 'US\\CT' }})
4365 self.assertEqual(1, len(a))
4366
4367 a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Study',
4368 'Query' : { 'ModalitiesInStudy' : 'CT' }})
4369 self.assertEqual(1, len(a))