summaryrefslogtreecommitdiffstats
path: root/proxy/code/scripts/test-consumerapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/code/scripts/test-consumerapi.py')
-rwxr-xr-xproxy/code/scripts/test-consumerapi.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/proxy/code/scripts/test-consumerapi.py b/proxy/code/scripts/test-consumerapi.py
new file mode 100755
index 0000000..f7f16ec
--- /dev/null
+++ b/proxy/code/scripts/test-consumerapi.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+import httplib, urllib
+import sys
+
+# GET list of consumers
+response = urllib.urlopen('http://localhost:8080/candlepin/consumer/')
+rsp = response.read()
+print("list of users: %s" % rsp)
+
+# GET candlepin user
+response = urllib.urlopen('http://localhost:8080/candlepin/consumer/candlepin')
+rsp = response.read()
+print("get: %s" % rsp)
+