summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <adrian@alikins.usersys.redhat.com>2009-11-20 12:54:07 -0500
committerAdrian Likins <adrian@alikins.usersys.redhat.com>2009-11-20 12:54:07 -0500
commit678bcb6c065a6ecac89f429309d46b0888299189 (patch)
treeadd8f8e264081a88872c4320a816247eb5a9f089
parentc74cc81fbd0b3600a6f596915b0cf887e10d2077 (diff)
downloadcandlepin-678bcb6c065a6ecac89f429309d46b0888299189.tar.gz
candlepin-678bcb6c065a6ecac89f429309d46b0888299189.tar.xz
candlepin-678bcb6c065a6ecac89f429309d46b0888299189.zip
call owner/$uuid (aka, OwnerResource.get())
-rwxr-xr-xproxy/code/scripts/test-ownerapi.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/proxy/code/scripts/test-ownerapi.py b/proxy/code/scripts/test-ownerapi.py
index 6b4f501..83ccbbc 100755
--- a/proxy/code/scripts/test-ownerapi.py
+++ b/proxy/code/scripts/test-ownerapi.py
@@ -3,8 +3,21 @@
import httplib, urllib
import sys
import simplejson
+import pprint
+
+# test OwnerResourse.list
response = urllib.urlopen('http://localhost:8080/candlepin/owner')
rsp = response.read()
print("get: %s" % rsp)
+result = simplejson.loads(rsp)
+pprint.pprint(result)
+
+
+# test OwnerResourse.get
+for owner in result['owner']:
+ response = urllib.urlopen('http://localhost:8080/candlepin/owner/%s' % owner['uuid'])
+ rsp = response.read()
+ result = simplejson.loads(rsp)
+ pprint.pprint(result)