Skip to content

Commit 27804bb

Browse files
committed
updated download test
1 parent d338de8 commit 27804bb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fri/test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import requests
22
import os
3-
import webbrowser
3+
import urllib.request
44

55
# function to test upload() method.
66
def upload():
@@ -16,7 +16,7 @@ def upload():
1616

1717
response = requests.request("POST", url, headers=headers, data=payload, files=files)
1818

19-
return response.text
19+
print(response.text)
2020

2121

2222
# # *******
@@ -35,12 +35,12 @@ def execute():
3535

3636
response = requests.request("POST", url, headers=headers, data=payload, files=files)
3737

38-
return response.text
38+
print(response.text)
3939

4040
# or
4141
def download():
4242
url = "http://127.0.0.1:5000/download/test?fetch=f1.txt&apikey=xyz"
43-
webbrowser.open(url)
43+
urllib.request.urlretrieve(url, "f1.txt")
4444

4545
upload()
4646
execute()

0 commit comments

Comments
 (0)