# HG changeset patch # User Sebastien Jodogne # Date 1720786069 -7200 # Node ID 36c00333f6eff7067481871276e8b5a78c2d78f3 # Parent f92a2036fb9623090f9029754df0c6ff29a54926 fix test diff -r f92a2036fb96 -r 36c00333f6ef Tests/Tests.py --- a/Tests/Tests.py Fri Jul 12 10:55:29 2024 +0200 +++ b/Tests/Tests.py Fri Jul 12 14:07:49 2024 +0200 @@ -5443,13 +5443,18 @@ UploadInstance(_REMOTE, 'DummyCT.dcm') UploadInstance(_REMOTE, 'DummyCTInvalidRows.dcm') - i = CallFindScu([ '-k', '0008,0052=IMAGES', '-k', 'Rows', '-k', 'PatientName' ]) + i = CallFindScu([ '-k', '0008,0052=IMAGES', '-k', 'PatientName', '-k', 'Rows', '-k', 'Columns' ]) # We have 2 instances... patientNames = re.findall('\(0010,0010\).*?\[(.*?)\]', i) self.assertEqual(2, len(patientNames)) self.assertEqual('KNIX', patientNames[0]) self.assertEqual('KNIX', patientNames[1]) + + columns = re.findall('\(0028,0011\) US ([0-9]+)', i) + self.assertEqual(2, len(columns)) + self.assertEqual('512', columns[0]) + self.assertEqual('512', columns[1]) # ...but only 1 value for the "Rows" tag rows = re.findall('\(0028,0010\) US ([0-9]+)', i) @@ -5857,7 +5862,14 @@ # This test fails on Orthanc <= 1.5.8 'Level' : 'Study', 'Query' : { - 'SeriesDescription' : '*' # Wildcard matching => no match, as the tag is absent + 'ImageComments' : '*' # Wildcard matching => no match, as the tag is absent + }, + 'Normalize' : False + })) + self.assertEqual(1, CountAnswers({ + 'Level' : 'Study', + 'Query' : { + 'ImageComments' : '' }, 'Normalize' : False })) @@ -5871,7 +5883,14 @@ self.assertEqual(1, CountAnswers({ 'Level' : 'Study', 'Query' : { - 'SeriesDescription' : '*' # Matches, as wiped out by the normalization + 'ImageComments' : '*' # Matches, as wiped out by the normalization + }, + 'Normalize' : True + })) + self.assertEqual(1, CountAnswers({ + 'Level' : 'Study', + 'Query' : { + 'ImageComments' : '' }, 'Normalize' : True }))