From d87d588843f08e7e1e2e6f752029b1581d85d9b0 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Fri, 31 Jul 2009 13:37:12 -0400 Subject: add test client for consumers --- proxy/code/scripts/test-consumerapi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 proxy/code/scripts/test-consumerapi.py (limited to 'proxy/code/scripts/test-consumerapi.py') 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) + -- cgit