Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/w/i/wille-2.3/tests/exec_grouped.py   wille(Download)
if debug: print( "Execute a single service" )
time1_1 = time.clock()
results = cl.execute_service(name='timeout_test', params=params) 
time1_2 = time.clock()
d1 = time1_2-time1_1

src/w/i/wille-2.3/tests/http_upload_size.py   wille(Download)
	if debug: print("Trying %s MB upload... (checksum=%s)" % (len(raw_data)/1024/1024.0, calc_checksum))
	time1 = time.clock()
	r=cl.execute_service(name='upload_test',params=dict(checksum=calc_checksum,raw_data=raw_data))
	time2 = time.clock()
	if debug: print("Total execution time: %s s (%s MB/s)" % (time2-time1, (filesize*1.0/(time2-time1))))

src/w/i/wille-2.3/tests/http_timeout.py   wille(Download)
for timeout in timeouts:
	if debug: print("Testing %s sec timeout" % timeout)
	r=cl.execute_service(name='timeout_test',params=dict(timeout=('%s'%timeout)))
 
# Kill server

src/w/i/wille-2.3/tests/http_exec.py   wille(Download)
# Simple HTTP GET from localhost
if debug: print("HTTP GET")
resp = cl.execute_service(uri='http://localhost:8080/')
assert( resp.data == 'GET OK' )
 
# HTTP GET with HTTP Basic Authentication
if debug: print("HTTP GET + Basic Auth")
cl.keyring.add_token_username('validusername', 'validpassword', 'localhost:8080')
resp = cl.execute_service(uri='http://localhost:8080/httpbasic')