changeset 665:e024ba9e7768

extended test_rest_find_limit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jul 2024 21:29:55 +0200
parents 854640df43d3
children acd22dd27e30
files Tests/Tests.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Sat Jul 06 11:59:44 2024 +0200
+++ b/Tests/Tests.py	Thu Jul 11 21:29:55 2024 +0200
@@ -4150,6 +4150,11 @@
                                              'Limit' : 3 })
         self.assertEqual(3, len(a))
 
+        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
+                                             'Query' : { 'PatientName' : 'B*' },
+                                             'Limit' : 0 })  # This is an arbitrary convention
+        self.assertEqual(4, len(a))
+
         b = []
         for i in range(4):
             a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
@@ -4162,6 +4167,12 @@
         # Check whether the two sets are equal through symmetric difference
         self.assertEqual(0, len(set(b) ^ set(brainix)))
 
+        a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
+                                             'Query' : { 'PatientName' : 'B*' },
+                                             'Limit' : 1,
+                                             'Since' : 4 })
+        self.assertEqual(0, len(a))
+
         # Check using KNEE
         a = DoPost(_REMOTE, '/tools/find', { 'Level' : 'Instance',
                                              'Query' : { 'PatientName' : 'K*' },