mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-02 18:23:40 -05:00
chore: bump aiofiles, dotenv, fastapi, pydantic, uvicorn (#1944)
* update aiofiles and dotenv * bump fastapi and pydantic * update testclient * bump ruff and uvicorn
This commit is contained in:
@@ -13,7 +13,7 @@ def test_failed_login(api_client: TestClient):
|
||||
settings = get_app_settings()
|
||||
|
||||
form_data = {"username": settings.DEFAULT_EMAIL, "password": "WRONG_PASSWORD"}
|
||||
response = api_client.post(api_routes.auth_token, form_data)
|
||||
response = api_client.post(api_routes.auth_token, data=form_data)
|
||||
|
||||
assert response.status_code == 401
|
||||
|
||||
@@ -22,7 +22,7 @@ def test_superuser_login(api_client: TestClient, admin_token):
|
||||
settings = get_app_settings()
|
||||
|
||||
form_data = {"username": settings.DEFAULT_EMAIL, "password": settings.DEFAULT_PASSWORD}
|
||||
response = api_client.post(api_routes.auth_token, form_data)
|
||||
response = api_client.post(api_routes.auth_token, data=form_data)
|
||||
|
||||
assert response.status_code == 200
|
||||
new_token = json.loads(response.text).get("access_token")
|
||||
@@ -48,12 +48,12 @@ def test_user_lockout_after_bad_attemps(api_client: TestClient, unique_user: Tes
|
||||
|
||||
for _ in range(settings.SECURITY_MAX_LOGIN_ATTEMPTS):
|
||||
form_data = {"username": unique_user.email, "password": "bad_password"}
|
||||
response = api_client.post(api_routes.auth_token, form_data)
|
||||
response = api_client.post(api_routes.auth_token, data=form_data)
|
||||
|
||||
assert response.status_code == 401
|
||||
|
||||
valid_data = {"username": unique_user.email, "password": unique_user.password}
|
||||
response = api_client.post(api_routes.auth_token, valid_data)
|
||||
response = api_client.post(api_routes.auth_token, data=valid_data)
|
||||
assert response.status_code == 423
|
||||
|
||||
# Cleanup
|
||||
|
||||
Reference in New Issue
Block a user