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_get_all_20_cs10 ():
aquests.configure (10, callback = request_finished, force_http1 = 0, http2_constreams = 3)
for i in range (1000):
aquests.get ("https://127.0.0.1:5002/v1/console/needtofix")
aquests.fetchall ()
def test_get2 ():
aquests.get ("https://pypi.python.org/pypi?name=aquests")
aquests.get ("https://www.google.co.kr/search?q=aquests")
aquests.fetchall ()
def test_6 (self):
aquests.configure (1, callback = self.equal404)
aquests.get (SERVER + "/no-page")
aquests.fetchall ()
def test_11 (self):
aquests.configure (1, callback = self.equal404, force_http1 = True)
for i in range (10):
aquests.get (SERVER + "/no-page")
aquests.fetchall ()
def test_11 (self):
aquests.configure (1, callback = self.equal404, force_http1 = True)
for i in range (10):
aquests.get (SERVER + "/no-page")
aquests.fetchall ()
import aquests
def request_finished (r):
args = (r.status_code, r.reason, len (r.content))
print ("%s %s %d bytes received" % args, r.version)
aquests.configure (10, callback = request_finished, force_http1 = 0)
for i in range (1000):
aquests.get ("http://127.0.0.1:5000/")
aquests.fetchall ()
import aquests
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 ()
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 ()
def make_example_testset ():
if os.path.isfile (r"D:\apps\skitai\tests\examples"):
jpg = open (os.path.join (r"D:\apps\skitai\tests\examples", "statics", "reindeer.jpg"), "rb")
aquests.upload ("http://127.0.0.1:5000/upload", {"username": "pytest", "file1": jpg})
aquests.get ("http://127.0.0.1:5000/")
aquests.get ("http://127.0.0.1:5000/members/", auth = ('admin', '1111'))
aquests.get ("http://127.0.0.1:5000/redirect1")
aquests.rpc ("http://127.0.0.1:5000/rpc2/").add_number (1, 2)
aquests.ws ("ws://127.0.0.1:5000/websocket/echo-single", "Hello Skitai")