changeset 237:21aa666c8fa0

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 14 May 2019 10:42:53 +0200
parents 2de1aec255ae
children 50c694cd5bbf
files Tests/Tests.py
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Tue May 14 10:29:58 2019 +0200
+++ b/Tests/Tests.py	Tue May 14 10:42:53 2019 +0200
@@ -4702,3 +4702,21 @@
         self.assertEqual(1, len(b))
         self.assertTrue('Rows' in b[0])
         self.assertEqual('512', b[0]['Rows'])
+
+        a = DoPost(_REMOTE, '/modalities/self/query', {
+            'Level' : 'Instance',
+            'Query' : { 'Rows' : '' },
+            'Normalize' : False
+        }) ['ID']
+
+        b = DoGet(_REMOTE, '/queries/%s/answers?expand&simplify' % a)
+        self.assertEqual(1, len(b))
+        self.assertTrue('Rows' in b[0])
+        self.assertEqual('512', b[0]['Rows'])
+
+        self.assertRaises(Exception, lambda: DoPost(
+            _REMOTE, '/modalities/self/query', {
+                'Level' : 'Instance',
+                'Query' : { 'Rows' : '*' },  # Out-of-range value
+                'Normalize' : False
+            }))