Refactoring code for modular approach

This commit is contained in:
2025-09-10 20:48:55 +02:00
parent 1fc8810242
commit fca389cff4
5 changed files with 40 additions and 38 deletions

View File

@@ -66,7 +66,7 @@ class TestAuthenticationAPI:
assert response.status_code == 401
assert "Incorrect username or password" in response.json()["detail"]
def test_login_nonexistent_user(self, client):
def test_login_nonexistent_user(self, client, db): # Added db fixture
"""Test login with nonexistent user"""
response = client.post("/api/v1/auth/login", json={
"username": "nonexistent",
@@ -116,4 +116,3 @@ class TestAuthManager:
assert token_data["token_type"] == "bearer"
assert "expires_in" in token_data
assert isinstance(token_data["expires_in"], int)