Mercurial > hg > orthanc-tests
comparison Plugins/DicomWeb/Run.py @ 284:7fa5c7a03137
added test for issue #56
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 26 Mar 2020 07:57:01 +0100 |
parents | 514785dacd6d |
children | f95cd3af1c7a |
comparison
equal
deleted
inserted
replaced
283:51b08c50c780 | 284:7fa5c7a03137 |
---|---|
1104 self.assertEqual(1, len(DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study, | 1104 self.assertEqual(1, len(DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study, |
1105 headers = { 'Accept' : 'application/json, application/dicom+xml' }))) | 1105 headers = { 'Accept' : 'application/json, application/dicom+xml' }))) |
1106 | 1106 |
1107 self.assertEqual(1, len(DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study, | 1107 self.assertEqual(1, len(DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study, |
1108 headers = { 'Accept' : 'application/dicom+xml, application/json' }))) | 1108 headers = { 'Accept' : 'application/dicom+xml, application/json' }))) |
1109 | 1109 |
1110 | 1110 |
1111 | |
1112 def test_bitbucket_issue_56(self): | |
1113 # "Case-insensitive matching over accents" => DICOMweb part | |
1114 # from AlexanderM on 2020-03-20 | |
1115 # https://bitbucket.org/sjodogne/orthanc/issues/56/ | |
1116 UploadInstance(ORTHANC, 'Issue56-NoPixelData.dcm') | |
1117 | |
1118 self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', { | |
1119 'Level' : 'Patient', | |
1120 'Query' : { | |
1121 'PatientName' : 'Гусева*', | |
1122 }, | |
1123 }))) | |
1124 | |
1125 self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', { | |
1126 'Level' : 'Patient', | |
1127 'Query' : { | |
1128 'PatientName' : 'гусева*', | |
1129 }, | |
1130 }))) | |
1131 | |
1132 self.assertEqual(1, len(DoGet(ORTHANC, u'/dicom-web/studies?PatientName=Гусева*', | |
1133 headers = { 'accept' : 'application/json' }))) | |
1134 | |
1135 # This line is the isse | |
1136 self.assertEqual(1, len(DoGet(ORTHANC, u'/dicom-web/studies?PatientName=гусева*', | |
1137 headers = { 'accept' : 'application/json' }))) | |
1138 | |
1111 | 1139 |
1112 try: | 1140 try: |
1113 print('\nStarting the tests...') | 1141 print('\nStarting the tests...') |
1114 unittest.main(argv = [ sys.argv[0] ] + args.options) | 1142 unittest.main(argv = [ sys.argv[0] ] + args.options) |
1115 | 1143 |