diff options
author | jesus m. rodriguez <jesusr@redhat.com> | 2009-07-14 13:44:21 -0400 |
---|---|---|
committer | jesus m. rodriguez <jesusr@redhat.com> | 2009-07-14 13:44:21 -0400 |
commit | a18f3cfa17584b4c9f69b6fb73695ba0230315da (patch) | |
tree | 9ca68033d772a8ec9053ed025ebc2154b022f844 /proxy/code/scripts/test-userapi.py | |
parent | fe1d9469d178fe9d6b295bffe9f727dc771fa2f3 (diff) | |
download | candlepin-a18f3cfa17584b4c9f69b6fb73695ba0230315da.tar.gz candlepin-a18f3cfa17584b4c9f69b6fb73695ba0230315da.tar.xz candlepin-a18f3cfa17584b4c9f69b6fb73695ba0230315da.zip |
added test list methods to determine best course of action for JSONifying lists
Diffstat (limited to 'proxy/code/scripts/test-userapi.py')
-rwxr-xr-x | proxy/code/scripts/test-userapi.py | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/proxy/code/scripts/test-userapi.py b/proxy/code/scripts/test-userapi.py index 32714e9..6fba16e 100755 --- a/proxy/code/scripts/test-userapi.py +++ b/proxy/code/scripts/test-userapi.py @@ -13,11 +13,31 @@ headers = {"Content-type":"application/json", conn = httplib.HTTPConnection("localhost", 8080) conn.request("POST", '/candlepin/user', params, headers) response = conn.getresponse() -print response.status, response.reason +print("Status: %d Response: %s" % (response.status, response.reason)) rsp = response.read() conn.close() -print rsp +print("create: %s" % rsp) response = urllib.urlopen('http://localhost:8080/candlepin/user/candlepin') rsp = response.read() -print(rsp) +print("get: %s" % rsp) + +response = urllib.urlopen('http://localhost:8080/candlepin/user/list') +rsp = response.read() +print("list: %s" % rsp) + +response = urllib.urlopen('http://localhost:8080/candlepin/user/listusers') +rsp = response.read() +print("listusers: %s" % rsp) + +response = urllib.urlopen('http://localhost:8080/candlepin/user/uselist') +rsp = response.read() +print("uselist: %s" % rsp) + +response = urllib.urlopen('http://localhost:8080/candlepin/user/listobjects') +rsp = response.read() +print("listobjects: %s" % rsp) + +response = urllib.urlopen('http://localhost:8080/candlepin/user/listbasemodel') +rsp = response.read() +print("listbasemodel: %s" % rsp) |