changeset 284:7fa5c7a03137

added test for issue #56
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 26 Mar 2020 07:57:01 +0100
parents 51b08c50c780
children 281a32ecc5c1
files Database/Issue56-NoPixelData.dcm Plugins/DicomWeb/Run.py
diffstat 2 files changed, 30 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
Binary file Database/Issue56-NoPixelData.dcm has changed
--- a/Plugins/DicomWeb/Run.py	Wed Mar 18 14:51:20 2020 +0100
+++ b/Plugins/DicomWeb/Run.py	Thu Mar 26 07:57:01 2020 +0100
@@ -1106,8 +1106,36 @@
 
         self.assertEqual(1, len(DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study,
                                       headers = { 'Accept' : 'application/dicom+xml, application/json' })))
-        
-        
+
+
+
+    def test_bitbucket_issue_56(self):
+        # "Case-insensitive matching over accents" => DICOMweb part
+        # from AlexanderM on 2020-03-20
+        # https://bitbucket.org/sjodogne/orthanc/issues/56/
+        UploadInstance(ORTHANC, 'Issue56-NoPixelData.dcm')
+
+        self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', {
+            'Level' : 'Patient',
+            'Query' : {
+                'PatientName' : 'Гусева*',
+            },
+        })))
+
+        self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', {
+            'Level' : 'Patient',
+            'Query' : {
+                'PatientName' : 'гусева*',
+            },
+        })))
+
+        self.assertEqual(1, len(DoGet(ORTHANC, u'/dicom-web/studies?PatientName=Гусева*',
+                                      headers = { 'accept' : 'application/json' })))
+
+        # This line is the isse
+        self.assertEqual(1, len(DoGet(ORTHANC, u'/dicom-web/studies?PatientName=гусева*',
+                                      headers = { 'accept' : 'application/json' })))
+
         
 try:
     print('\nStarting the tests...')