changeset 675:c8c4bebf18b8

fix limit=0 test
author Alain Mazy <am@orthanc.team>
date Tue, 03 Sep 2024 16:37:53 +0200
parents 676dd1f784b9
children 85c1447fa86b
files Tests/Tests.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Thu Aug 29 10:54:20 2024 +0200
+++ b/Tests/Tests.py	Tue Sep 03 16:37:53 2024 +0200
@@ -2908,7 +2908,8 @@
         self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/patients&since=10' % i))
         self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/patients&limit=10' % i))
 
-        self.assertEqual(0, len(DoGet(_REMOTE, '/patients?since=0&limit=0')))
+        if not IsOrthancVersionAbove(_REMOTE, 1, 12, 5):   # with ExtendedFind, the limit=0 means no-limit like in /tools/find
+            self.assertEqual(0, len(DoGet(_REMOTE, '/patients?since=0&limit=0')))
         self.assertEqual(2, len(DoGet(_REMOTE, '/patients?since=0&limit=100')))
         self.assertEqual(2, len(DoGet(_REMOTE, '/studies?since=0&limit=100')))
         self.assertEqual(4, len(DoGet(_REMOTE, '/series?since=0&limit=100')))