summaryrefslogtreecommitdiffstats
path: root/proxy/code/scripts/test-productapi.py
diff options
context:
space:
mode:
authorjesus m. rodriguez <jesusr@redhat.com>2009-11-16 16:30:00 -0500
committerjesus m. rodriguez <jesusr@redhat.com>2009-11-16 16:30:00 -0500
commit4cfab46babfc3db27ec4afa0c62ffe821b2e5c07 (patch)
tree5cd154d756359078ab9b532c7514c2adee4212fb /proxy/code/scripts/test-productapi.py
parentff68ba177bee145a7496f5173bd55834336ba521 (diff)
downloadcandlepin-4cfab46babfc3db27ec4afa0c62ffe821b2e5c07.tar.gz
candlepin-4cfab46babfc3db27ec4afa0c62ffe821b2e5c07.tar.xz
candlepin-4cfab46babfc3db27ec4afa0c62ffe821b2e5c07.zip
adding GET /products/ list
Diffstat (limited to 'proxy/code/scripts/test-productapi.py')
-rwxr-xr-xproxy/code/scripts/test-productapi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/proxy/code/scripts/test-productapi.py b/proxy/code/scripts/test-productapi.py
new file mode 100755
index 0000000..ee95906
--- /dev/null
+++ b/proxy/code/scripts/test-productapi.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+
+import httplib, urllib
+import sys
+import simplejson
+
+response = urllib.urlopen('http://localhost:8080/candlepin/product')
+rsp = response.read()
+print("list: %s" % rsp)
+prod = simplejson.loads(rsp)
+print(type(prod))