changeset 717:f2d3d7c701ec find-refactoring

ResponseContent
author Alain Mazy <am@orthanc.team>
date Wed, 09 Oct 2024 10:23:21 +0200
parents 998f83ddd4de
children e1b7654fb58d
files Tests/Tests.py
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Tue Oct 08 17:51:56 2024 +0200
+++ b/Tests/Tests.py	Wed Oct 09 10:23:21 2024 +0200
@@ -11232,7 +11232,6 @@
                                                     'RequestedTags': ['StudyDate']
                                                     })
 
-            # backward compat for Expand = True at instance level
             self.assertIn('ID', a[0])            # the ID is always in the response
             self.assertIn('Type', a[0])          # the Type is always in the response
             self.assertIn('RequestedTags', a[0]) # the RequestedTags are always in the response as soon as you have requested them
@@ -11241,6 +11240,21 @@
             self.assertIn('UncompressedSize', a[0]['Attachments'][0])
 
 
+            # 'internal check': make sure we get the SOPClassUID even when we do not request the Metadata
+            a = DoPost(_REMOTE, '/tools/find', {    'Level' : 'Instances',
+                                                    'Query' : { 
+                                                        'SeriesDescription' : 'T*'
+                                                    },
+                                                    'ResponseContent' : [],
+                                                    'RequestedTags': ['SOPClassUID']
+                                                    })
+
+            self.assertIn('ID', a[0])            # the ID is always in the response
+            self.assertIn('Type', a[0])          # the Type is always in the response
+            self.assertIn('RequestedTags', a[0]) # the RequestedTags are always in the response as soon as you have requested them
+            self.assertIn('SOPClassUID', a[0]['RequestedTags'])
+
+
     def test_extended_find_full(self):
         if IsOrthancVersionAbove(_REMOTE, 1, 12, 5) and HasExtendedFind(_REMOTE): # TODO: remove HasExtendedFind once find-refactoring branch has been merged