changeset 417:a5b6a8f2dd98

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Jun 2021 14:33:04 +0200
parents 80164728c038
children 8a3d67a40083
files Tests/Tests.py
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Wed Jun 23 14:22:15 2021 +0200
+++ b/Tests/Tests.py	Wed Jun 23 14:33:04 2021 +0200
@@ -7762,6 +7762,26 @@
             self.assertEqual(series, DoGet(_REMOTE, '/instances/%s/series' % i) ['ID'])
             self.assertEqual(study, DoGet(_REMOTE, '/instances/%s/study' % i) ['ID'])
             
+        self.assertRaises(Exception, lambda: DoPost(_REMOTE, '/studies/%s/split' % study, {
+            'KeepSource' : False
+        }))  # Neither "Instances", nor "Series"
+
+        self.assertRaises(Exception, lambda: DoPost(_REMOTE, '/studies/%s/split' % study, {
+            'KeepSource' : False,
+            'Instances' : [ ],
+            'Series' : [ ]
+        }))  # Empty "Instances" and "Series"
+
+        self.assertRaises(Exception, lambda: DoPost(_REMOTE, '/studies/%s/split' % study, {
+            'Instances' : [ 'nope' ],
+            'KeepSource' : False
+        }))
+
+        self.assertRaises(Exception, lambda: DoPost(_REMOTE, '/studies/%s/split' % study, {
+            'Series' : [ 'nope' ],
+            'KeepSource' : False
+        }))
+
         result = DoPost(_REMOTE, '/studies/%s/split' % study, {
             'Instances' : [ knee1 ],
             'KeepSource' : False