1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-26 15:04:18 +00:00
pds-2021-g2-nest/code/backend/nest_backend/test/test_user_add.py

10 lines
371 B
Python
Raw Normal View History

2021-05-07 22:14:20 +00:00
from flask.testing import Client
# test add user utente_test
def test_user_add(flask_client: Client, access_token: str):
r = flask_client.post(f'/api/v1/users/', headers={'Authorization': f"Bearer {access_token}"},
json={'email': 'utente_test@nest.com', 'password': 'password', 'username': 'utente_test'})
assert b'success' in r.data