Rename sync_series_from_data_files to sync_legacy_series_to_db
- Rename function to reflect its legacy status - Add deprecation warning log on execution - Update all callers (initialization_service, api/config, fastapi_app) - Update tests to use new name - Add deprecation notice to DEVELOPMENT.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -160,7 +160,7 @@ class TestSyncAnimeFolders:
|
||||
@pytest.mark.asyncio
|
||||
async def test_sync_anime_folders_without_progress(self):
|
||||
"""Test syncing anime folders without progress service."""
|
||||
with patch('src.server.services.initialization_service.sync_series_from_data_files',
|
||||
with patch('src.server.services.initialization_service.sync_legacy_series_to_db',
|
||||
new_callable=AsyncMock, return_value=42) as mock_sync:
|
||||
result = await _sync_anime_folders()
|
||||
|
||||
@@ -172,7 +172,7 @@ class TestSyncAnimeFolders:
|
||||
"""Test syncing anime folders with progress updates."""
|
||||
mock_progress = AsyncMock()
|
||||
|
||||
with patch('src.server.services.initialization_service.sync_series_from_data_files',
|
||||
with patch('src.server.services.initialization_service.sync_legacy_series_to_db',
|
||||
new_callable=AsyncMock, return_value=10) as mock_sync:
|
||||
result = await _sync_anime_folders(progress_service=mock_progress)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user