9 lines
390 B
Python
9 lines
390 B
Python
|
|
def test_usr_login(test_client,test_user):
|
|
response = test_client.post("/api/token", data={"username": test_user["email"], "password": test_user["password"]})
|
|
assert response.status_code == 200
|
|
assert "access_token" in response.json()
|
|
assert "token_type" in response.json()
|
|
assert response.json()["user_name"] == test_user["first_name"]+ " " + test_user["last_name"]
|
|
|