mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 06:24:19 +00:00
eliminate print di controllo
This commit is contained in:
parent
925ff9a9fa
commit
deefe6841a
1 changed files with 3 additions and 3 deletions
|
@ -8,13 +8,13 @@ auth_code = ""
|
|||
class MyTestCase(unittest.TestCase):
|
||||
def test_login(self):
|
||||
global auth_code
|
||||
r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'})
|
||||
r = requests.post('http://localhost:5000/api/v1/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': ''})
|
||||
r = requests.post('http://localhost:5000/api/v1/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/v1/login', json={'email': 'admin@admin.com', 'password': 'password'})
|
||||
j = json.loads(r.text)
|
||||
assert j['result'] == "success"
|
||||
auth_code = j['data']['access_token']
|
||||
|
|
Loading…
Reference in a new issue