Fix integration test failures
- Fix test_data_file_db_sync.py: Remove unused mock logger parameters - Fix test_nfo_workflow.py: Add missing async mocks for TMDB methods * Add get_tv_show_content_ratings mock for FSK rating support * Add get_image_url mock to return proper URL strings * Fix test_nfo_update_workflow to include TMDB ID in existing NFO - Fix DownloadService method calls in test fixtures * Change stop() to stop_downloads() (correct method name) * Change start() to start_queue_processing() * Add exception handling for ProgressServiceError in teardown - All 1380 tests now passing with 0 failures and 0 errors
This commit is contained in:
@@ -73,6 +73,7 @@ async def anime_service(mock_series_app, progress_service):
|
||||
@pytest.fixture
|
||||
async def download_service(anime_service, progress_service):
|
||||
"""Create a DownloadService with mock queue repository."""
|
||||
from src.server.services.progress_service import ProgressServiceError
|
||||
from tests.unit.test_download_service import MockQueueRepository
|
||||
|
||||
mock_repo = MockQueueRepository()
|
||||
@@ -82,7 +83,11 @@ async def download_service(anime_service, progress_service):
|
||||
queue_repository=mock_repo,
|
||||
)
|
||||
yield service
|
||||
await service.stop()
|
||||
try:
|
||||
await service.stop_downloads()
|
||||
except ProgressServiceError:
|
||||
# Progress may already be completed, ignore
|
||||
pass
|
||||
|
||||
|
||||
class TestDownloadProgressIntegration:
|
||||
|
||||
Reference in New Issue
Block a user