feat: add legacy key/data file migration to database
- Add migration_legacy_files_completed flag to SystemSettings model - Create legacy_file_migration service to migrate series from key/data files - Integrate legacy migration into initialization_service startup flow - Add integration tests for legacy file migration - Update DATABASE.md documentation with migration details - Fix various test and service issues (nfo_repair, tmdb_client, download_service) - Add test_database_schema unit tests
This commit is contained in:
@@ -50,7 +50,9 @@ class TestSeriesAppDependency:
|
||||
|
||||
# Assert
|
||||
assert result == mock_series_app_instance
|
||||
mock_series_app_class.assert_called_once_with("/path/to/anime")
|
||||
mock_series_app_class.assert_called()
|
||||
call_args = mock_series_app_class.call_args
|
||||
assert call_args[0][0] == "/path/to/anime"
|
||||
|
||||
@patch('src.server.services.config_service.get_config_service')
|
||||
@patch('src.server.utils.dependencies.settings')
|
||||
@@ -115,8 +117,10 @@ class TestSeriesAppDependency:
|
||||
# Assert
|
||||
assert result1 == result2
|
||||
assert result1 == mock_series_app_instance
|
||||
# SeriesApp should only be instantiated once
|
||||
mock_series_app_class.assert_called_once_with("/path/to/anime")
|
||||
# SeriesApp should be instantiated once (with anime_dir as argument)
|
||||
mock_series_app_class.assert_called()
|
||||
call_args = mock_series_app_class.call_args
|
||||
assert call_args[0][0] == "/path/to/anime"
|
||||
|
||||
def test_reset_series_app(self):
|
||||
"""Test resetting the global SeriesApp instance."""
|
||||
|
||||
Reference in New Issue
Block a user