Upgrade fastapi and fix tests

This commit is contained in:
grossmj committed 2024-10-31 19:23:28 +10:00
1 parent 8c7c17b889
commit ce4dd17409
2 files changed
+5 -2

No files matched your search

@@ -266,6 +266,7 @@ class TestUserLogin:
(
("wrong_username", "user1_password", status.HTTP_401_UNAUTHORIZED),
("user1", "wrong_password", status.HTTP_401_UNAUTHORIZED),
("user1", "", status.HTTP_401_UNAUTHORIZED),
("user1", None, status.HTTP_422_UNPROCESSABLE_ENTITY),
),
)
@@ -284,6 +285,8 @@ class TestUserLogin:
"username": username,
"password": password,
}
if password is None:
del login_data["password"]
response = await unauthorized_client.post(app.url_path_for("login"), data=login_data)
assert response.status_code == status_code
assert "access_token" not in response.json()