summaryrefslogtreecommitdiffstats
path: root/proxy/code/scripts/test-userapi.py
diff options
context:
space:
mode:
authorjesus m. rodriguez <jesusr@redhat.com>2009-07-30 14:36:23 -0400
committerjesus m. rodriguez <jesusr@redhat.com>2009-07-30 14:36:23 -0400
commit829e9411b235fa589d32fde3600bf6052337581d (patch)
tree354a40e7fce565c47acefdbcf0cf21c8f4f0152b /proxy/code/scripts/test-userapi.py
parent36ac1867cbd0f162c2481e4860771ba299112585 (diff)
downloadcandlepin-829e9411b235fa589d32fde3600bf6052337581d.tar.gz
candlepin-829e9411b235fa589d32fde3600bf6052337581d.tar.xz
candlepin-829e9411b235fa589d32fde3600bf6052337581d.zip
adding missing JsonTestObject, and updating conf files.
Diffstat (limited to 'proxy/code/scripts/test-userapi.py')
-rwxr-xr-xproxy/code/scripts/test-userapi.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/proxy/code/scripts/test-userapi.py b/proxy/code/scripts/test-userapi.py
index 45cc004..317c970 100755
--- a/proxy/code/scripts/test-userapi.py
+++ b/proxy/code/scripts/test-userapi.py
@@ -42,14 +42,10 @@ response = urllib.urlopen('http://localhost:8080/candlepin/user/listbasemodel')
rsp = response.read()
print("listbasemodel: %s" % rsp)
-print("TESTING json get")
-response = urllib.urlopen("http://localhost:8080/candlepin/user/testobject")
-rsp = response.read()
-print("testjsonobject get: %s" % rsp)
"""
-
-print("TESTING json create")
-params = urllib.urlencode({"name":"rhim","uuid":"joprsucks"})
+print("------------ TESTING json create")
+#params = urllib.urlencode({"name":"rhim","uuid":"joprsucks"})
+params = '{"name":"now","uuid":"thiswork"}'
headers = {"Content-type":"application/json",
"Accept": "application/json"}
conn = httplib.HTTPConnection("localhost", 8080)
@@ -58,3 +54,7 @@ response = conn.getresponse()
print("Status: %d Response: %s" % (response.status, response.reason))
rsp = response.read()
conn.close()
+print("------------ TESTING json get")
+response = urllib.urlopen("http://localhost:8080/candlepin/user/testobject")
+rsp = response.read()
+print("testjsonobject get: %s" % rsp)