diff Tests/Toolbox.py @ 28:156c7ae164b5

new test
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Jul 2015 12:10:30 +0200
parents 2a29bcff60a7
children ffa542cce638
line wrap: on
line diff
--- a/Tests/Toolbox.py	Mon Jun 29 14:44:00 2015 +0200
+++ b/Tests/Toolbox.py	Wed Jul 01 12:10:30 2015 +0200
@@ -70,8 +70,7 @@
         orthanc['Password'] != None):
         http.add_credentials(orthanc['Username'], orthanc['Password'])
 
-
-def DoGet(orthanc, uri, data = {}, body = None, headers = {}):
+def DoGetRaw(orthanc, uri, data = {}, body = None, headers = {}):
     d = ''
     if len(data.keys()) > 0:
         d = '?' + urlencode(data)
@@ -82,6 +81,12 @@
 
     resp, content = http.request(orthanc['Url'] + uri + d, 'GET', body = body,
                                  headers = headers)
+    return (resp, content)
+
+
+def DoGet(orthanc, uri, data = {}, body = None, headers = {}):
+    (resp, content) = DoGetRaw(orthanc, uri, data = data, body = body, headers = headers)
+
     if not (resp.status in [ 200 ]):
         raise Exception(resp.status)
     else: