Migrate download queue from JSON to SQLite database
- Created QueueRepository adapter in src/server/services/queue_repository.py - Refactored DownloadService to use repository pattern instead of JSON - Updated application startup to initialize download service from database - Updated all test fixtures to use MockQueueRepository - All 1104 tests passing
This commit is contained in:
@@ -72,11 +72,14 @@ async def anime_service(mock_series_app, progress_service):
|
||||
|
||||
@pytest.fixture
|
||||
async def download_service(anime_service, progress_service):
|
||||
"""Create a DownloadService."""
|
||||
"""Create a DownloadService with mock queue repository."""
|
||||
from tests.unit.test_download_service import MockQueueRepository
|
||||
|
||||
mock_repo = MockQueueRepository()
|
||||
service = DownloadService(
|
||||
anime_service=anime_service,
|
||||
progress_service=progress_service,
|
||||
persistence_path="/tmp/test_integration_progress_queue.json",
|
||||
queue_repository=mock_repo,
|
||||
)
|
||||
yield service
|
||||
await service.stop()
|
||||
|
||||
Reference in New Issue
Block a user