chore: apply pending code updates

This commit is contained in:
2026-03-17 11:39:27 +01:00
parent e5fae0a0a2
commit 92bd55ada1
45 changed files with 2236 additions and 2130 deletions

View File

@@ -4,12 +4,15 @@ This test verifies that the /api/anime/add endpoint can handle
multiple concurrent requests without blocking.
"""
import asyncio
import logging
import time
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from httpx import ASGITransport, AsyncClient
logger = logging.getLogger(__name__)
from src.server.fastapi_app import app
from src.server.services.auth_service import auth_service
from src.server.services.background_loader_service import get_background_loader_service
@@ -103,7 +106,7 @@ async def test_concurrent_anime_add_requests(authenticated_client):
f"indicating possible blocking issues"
)
print(f"3 concurrent anime add requests completed in {total_time:.2f}s")
logger.info("3 concurrent anime add requests completed in %.2fs", total_time)
@pytest.mark.asyncio
@@ -130,4 +133,4 @@ async def test_same_anime_concurrent_add(authenticated_client):
keys = [r.json().get("key") for r in responses]
assert keys[0] == keys[1], "Both responses should have the same key"
print(f"Concurrent same-anime requests handled correctly: {statuses}")
logger.info("Concurrent same-anime requests handled correctly: %s", statuses)