diff options
author | jortel <devnull@localhost> | 2008-11-24 18:46:12 +0000 |
---|---|---|
committer | jortel <devnull@localhost> | 2008-11-24 18:46:12 +0000 |
commit | 89f6fa5e0771c1b9f64423a750cb707d6cd593b9 (patch) | |
tree | af2afd237351e505e1d121bbf79b5f08fbc09b53 /tests | |
parent | b86ca3d7692e0defa752452ee102b6c8492b555a (diff) | |
download | suds-89f6fa5e0771c1b9f64423a750cb707d6cd593b9.tar.gz |
Add AuthenticatedTransport to provide basic http authentication. Add Options.username & Options.password which are passed to the transport as /options/
Diffstat (limited to 'tests')
-rw-r--r-- | tests/jasper.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/jasper.py b/tests/jasper.py index 60ea178..79389a1 100644 --- a/tests/jasper.py +++ b/tests/jasper.py @@ -25,7 +25,6 @@ import traceback as tb from tests import * from suds import WebFault from suds.client import Client -from suds.transport import HttpTransport errors = 0 @@ -33,15 +32,6 @@ setup_logging() #logging.getLogger('suds.client').setLevel(logging.DEBUG) -def opener(): - baseurl = 'http://localhost:9090/' - username = 'jasperadmin' - password = 'jasperadmin' - passman = urllib2.HTTPPasswordMgrWithDefaultRealm() - passman.add_password(None, baseurl, username, password) - authhandler = urllib2.HTTPBasicAuthHandler(passman) - return urllib2.build_opener(authhandler) - def start(url): print '\n________________________________________________________________\n' print 'Test @ ( %s )' % url @@ -49,9 +39,7 @@ def start(url): try: url = 'http://localhost:9090/jasperserver-pro/services/repository?wsdl' start(url) - t = HttpTransport() - t.urlopener = opener() - client = Client(url, transport=t) + client = Client(url, username='jeff', password='ortel') print client print client.service.list('') except WebFault, f: |