How to use the aquests.configure function in aquests

To help you get started, we’ve selected a few aquests examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hansroh / aquests / tests / examples / get3.py View on Github external
def test_7 (self):			
		aquests.configure (1, callback = self.equal404, force_http1 = True)
		aquests.get (SERVER + "/no-page")
		aquests.fetchall ()
github hansroh / aquests / tests / test_get.py View on Github external
def test_5 (self):	
		munreq = 1000				
		aquests.configure (1, callback = self.increase, http2_constreams = 10)
		for i in range (munreq):
			aquests.get (SERVER)
		aquests.fetchall ()
		self.assertEqual (self.checkout (), munreq)
github hansroh / aquests / tests / test_get.py View on Github external
def test_10 (self):			
		aquests.configure (1, callback = self.equal404)
		for i in range (10):
			aquests.get (SERVER + "/no-page")
		aquests.fetchall ()
github hansroh / aquests / tests / test_get_all_bench.py View on Github external
def get_all_20_cs10 ():
	aquests.configure (2000, http2_constreams = 1, force_http1 = 1)
	for i in range (3000): 
		aquests.get ("http://127.0.0.1:5000/")	
	aquests.fetchall ()
github hansroh / aquests / tests / test_upload.py View on Github external
def test_upload ():
	formdata = {
		'submit-name': 'Hans Roh', 
		"file1": open ("./README.txt", "rb")
	}
		
	aquests.configure (10)
	for i in range (100):
		aquests.upload ("http://127.0.0.1:5000/upload", formdata)
	aquests.fetchall ()
github hansroh / aquests / tests / test_mix_get_mongodb.py View on Github external
def test_mix_get_mongodb ():
	dbo = aquests.mongodb ("127.0.0.1:27017", "test_database")
	aquests.configure (20)
	for i in range (1000): 
		aquests.get ("http://127.0.0.1:5000/")
		dbo.findone ("posts", {"author": "Hans Roh"})
	aquests.fetchall ()
github hansroh / aquests / tests / test_timeout.py View on Github external
def test_timeout ():
    aquests.configure (1, timeout = 3)	
    aquests.get ("http://127.0.0.1:5000/test/sleep/20")
    aquests.fetchall ()
github hansroh / aquests / examples / get_proxypass.py View on Github external
import aquests

def finish_request (response):
	print (response.version, response.status_code, len (response.content))
	print (response.content [:80])
	
aquests.configure (5, callback = finish_request, force_http1 = 0)		
for i in range (5):
	#aquests.get ("http://127.0.0.1:5000/lb/pypi/aquests")
	aquests.get ("http://127.0.0.1:5000/lb/")
aquests.fetchall ()
github hansroh / aquests / examples / cookie.py View on Github external
import aquests

aquests.configure (1, cookie = True)	
aquests.get ("https://www.google.co.kr/?gfe_rd=cr&ei=3y14WPCTG4XR8gfSjoK4DQ")
#aquests.get ("https://aws.amazon.com/")
aquests.fetchall ()
github hansroh / aquests / examples / get_301_h2c.py View on Github external
import aquests

def finish_request (response):
	aquests.cb_gateway_demo (response)
	
aquests.configure (callback = finish_request)
for i in range (1):
	aquests.get ("http://127.0.0.1:5000/redirect1")	
aquests.fetchall ()