fixed tests

This commit is contained in:
2025-11-19 20:46:08 +01:00
parent 7b07e0cfae
commit 17c7a2e295
8 changed files with 291 additions and 16068 deletions

View File

@@ -95,6 +95,7 @@ def mock_download_service():
# Mock start/stop - start_queue_processing returns True on success
service.start_queue_processing = AsyncMock(return_value=True)
service.stop = AsyncMock()
service.stop_downloads = AsyncMock()
# Mock clear_completed and retry_failed
service.clear_completed = AsyncMock(return_value=5)
@@ -321,7 +322,7 @@ async def test_stop_downloads(authenticated_client, mock_download_service):
assert data["status"] == "success"
assert "stopped" in data["message"].lower()
mock_download_service.stop.assert_called_once()
mock_download_service.stop_downloads.assert_called_once()
@pytest.mark.asyncio