fix(tests): fixed a service test and one warning regarding 422 status
Some checks failed
Run Python Tests / build-and-test (push) Has been cancelled

This commit is contained in:
ribardej
2025-10-22 14:53:45 +02:00
parent aade88beb9
commit e78b8c2e6b
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ def test_e2e_minimal_auth_flow(client):
# 2) Attempt to login without payload should fail fast (validation error) # 2) Attempt to login without payload should fail fast (validation error)
login = client.post("/auth/jwt/login") login = client.post("/auth/jwt/login")
assert login.status_code in (status.HTTP_400_BAD_REQUEST, status.HTTP_422_UNPROCESSABLE_ENTITY) assert login.status_code in (status.HTTP_400_BAD_REQUEST, status.HTTP_422_UNPROCESSABLE_CONTENT)
# 3) Protected endpoint should not be accessible without token # 3) Protected endpoint should not be accessible without token
me = client.get("/users/me") me = client.get("/users/me")

View File

@@ -20,7 +20,7 @@ def test_get_jwt_strategy_lifetime():
strategy = user_service.get_jwt_strategy() strategy = user_service.get_jwt_strategy()
assert strategy is not None assert strategy is not None
# Basic smoke check: strategy has a lifetime set to 3600 # Basic smoke check: strategy has a lifetime set to 3600
assert getattr(strategy, "lifetime_seconds", None) in (3600,) assert getattr(strategy, "lifetime_seconds", None) in (604800,)
@pytest.mark.asyncio @pytest.mark.asyncio