Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_7 (self):
aquests.configure (1, callback = self.equal404, force_http1 = True)
aquests.get (SERVER + "/no-page")
aquests.fetchall ()
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)
def test_10 (self):
aquests.configure (1, callback = self.equal404)
for i in range (10):
aquests.get (SERVER + "/no-page")
aquests.fetchall ()
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 ()
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 ()
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 ()
def test_timeout ():
aquests.configure (1, timeout = 3)
aquests.get ("http://127.0.0.1:5000/test/sleep/20")
aquests.fetchall ()
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 ()
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 ()
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 ()