mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 13:05:21 +02: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:
parent
28cdd485f3
commit
d9c39cc1d0
10 changed files with 345 additions and 188 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue