From 829e9411b235fa589d32fde3600bf6052337581d Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Thu, 30 Jul 2009 14:36:23 -0400 Subject: adding missing JsonTestObject, and updating conf files. --- proxy/code/scripts/test-userapi.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'proxy/code/scripts/test-userapi.py') 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) -- cgit