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_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 ()
import aquests
formdata = {
'submit-name': 'Hans Roh',
"file1": open (r"D:\IDCs\serversoftwares\Coldfusion5\ClusterCATS-5.1-w32.exe", "rb")
}
aquests.configure (10)
for i in range (100):
aquests.upload ("http://127.0.0.1:5000/upload", formdata)
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")