-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
executable file
·24 lines (18 loc) · 944 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests
response = requests.post('http://localhost:5000/api/dict', json={'source': 'es', 'target':'en', 'word': 'hablar'}, timeout=10)
print(response.json())
j={'source': 'es', 'target':'en', 'word': "mujer"}
response = requests.post('http://localhost:5000/api/dict', json=j, timeout=10)
print(response.json())
j={'source': 'es', 'target':'en', 'word': "brazos"}
response = requests.post('http://localhost:5000/api/dict', json=j, timeout=10)
print(response.json())
j={'source': 'es', 'target':'en', 'word': "caliente"}
response = requests.post('http://localhost:5000/api/dict', json=j, timeout=10)
print(response.json())
j={'source': 'it', 'target':'en', 'word': "mezzo"}
response = requests.post('http://localhost:5000/api/dict', json=j, timeout=10)
print(response.json())
j={'source': 'en', 'target':'es', 'word': "backpack"}
response = requests.post('http://localhost:5000/api/dict', json=j, timeout=10)
print(response.json())