Refactoring code for modular approach
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user