4 from BaseClient import BaseClient, EnableVerboseExceptions
5 from AuthenticatedClient import AuthenticatedClient
7 EnableVerboseExceptions(True)
10 URL = "http://" + HOST + "/TESTAPI/"
11 SURL = "https://" + HOST + "/TESTAPI/"
13 print "*** testing some valid ops; these should print \"Hello, World\" ***"
16 print "HTTP noop:", bc.noop("Hello, World")
18 ac = AuthenticatedClient(URL, "gackstestuser.pkey", "gackstestuser.gid")
19 print "HTTP gidNoop:", ac.gidNoop("Hello, World")
22 print "HTTPS noop:", bc.noop("Hello, World")
24 ac = AuthenticatedClient(URL, "gackstestuser.pkey", "gackstestuser.gid")
25 print "HTTPS gidNoop:", ac.gidNoop("Hello, World")
28 print "*** testing some exception handling: ***"
31 print "HTTP typeError:",
33 result = bc.server.typeError()
36 print ''.join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))
38 print "HTTP badrequesthash:",
40 result = bc.server.badRequestHash()
43 print ''.join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))