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:
parent
bde82a4829
commit
5603f89064
1 changed files with 3 additions and 0 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue