1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00

aggiunto verifica senza parametri

This commit is contained in:
stefanogoldoni 2021-04-26 23:17:32 +02:00
parent bde82a4829
commit 5603f89064

View file

@ -9,6 +9,9 @@ def test_login():
r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'}) r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'})
j = json.loads(r.text) j = json.loads(r.text)
assert j['result'] == "failure" assert j['result'] == "failure"
r = requests.post('http://localhost:5000/api/login', json={'email': '', 'password': ''})
j = json.loads(r.text)
assert j['result'] == "failure"
r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'password'}) r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'password'})
j = json.loads(r.text) j = json.loads(r.text)
assert j['result'] == "success" assert j['result'] == "success"