import logging

def test_usr_login(test_client,test_user):
    response = test_client.post("/api/token", data={"username": test_user["email"], "password": test_user["password"]})
    data = response.json()
    logging.error(data)
    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"]

