style: apply black and isort formatting across entire codebase
- Standardize quote style (single to double quotes) - Reorder and group imports alphabetically - Fix line breaks and indentation for consistency - Apply PEP 8 formatting standards Also updated Makefile to exclude both venv and .venv from code quality checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# tests/integration/api/v1/test_auth_endpoints.py
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
import pytest
|
||||
from jose import jwt
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
@@ -178,8 +179,7 @@ class TestAuthenticationAPI:
|
||||
def test_get_current_user_invalid_token(self, client):
|
||||
"""Test getting current user with invalid token"""
|
||||
response = client.get(
|
||||
"/api/v1/auth/me",
|
||||
headers={"Authorization": "Bearer invalid_token_here"}
|
||||
"/api/v1/auth/me", headers={"Authorization": "Bearer invalid_token_here"}
|
||||
)
|
||||
|
||||
assert response.status_code == 401
|
||||
@@ -201,14 +201,11 @@ class TestAuthenticationAPI:
|
||||
}
|
||||
|
||||
expired_token = jwt.encode(
|
||||
expired_payload,
|
||||
auth_manager.secret_key,
|
||||
algorithm=auth_manager.algorithm
|
||||
expired_payload, auth_manager.secret_key, algorithm=auth_manager.algorithm
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/v1/auth/me",
|
||||
headers={"Authorization": f"Bearer {expired_token}"}
|
||||
"/api/v1/auth/me", headers={"Authorization": f"Bearer {expired_token}"}
|
||||
)
|
||||
|
||||
assert response.status_code == 401
|
||||
@@ -321,4 +318,3 @@ class TestAuthManager:
|
||||
user = auth_manager.authenticate_user(db, "nonexistent", "password")
|
||||
|
||||
assert user is None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user