From 5603f890641e8406624853ed3cb133ae79dcd345 Mon Sep 17 00:00:00 2001 From: stefanogoldoni Date: Mon, 26 Apr 2021 23:17:32 +0200 Subject: [PATCH] aggiunto verifica senza parametri --- code/backend/nest_backend/test/login_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/backend/nest_backend/test/login_test.py b/code/backend/nest_backend/test/login_test.py index 970e31b..998d91b 100644 --- a/code/backend/nest_backend/test/login_test.py +++ b/code/backend/nest_backend/test/login_test.py @@ -9,6 +9,9 @@ def test_login(): r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'}) j = json.loads(r.text) 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'}) j = json.loads(r.text) assert j['result'] == "success"