fix: task 1.5 poster check + fix stuck tests

- Fix structlog format string in folder_scan_service (%(key)d -> kwargs)
- Add nfo_download_poster setting check before poster download
- Create missing NFO fixture files (tvshow.nfo.bad/good) for repair tests
- Fix test_context_used_in_logging to check all call args not format string
- Fix test_system_settings_integration isolation via reset_all_scans
This commit is contained in:
2026-05-13 08:07:16 +02:00
parent eb2fc3c5ab
commit eb0e6e8ccb
5 changed files with 230 additions and 5 deletions

View File

@@ -10,8 +10,12 @@ async def test_system_settings_integration():
"""Test SystemSettings service with actual database operations."""
# Initialize database
await init_db()
# Test get_or_create (should create on first call)
# Reset all flags to a known-clean state before the test
async with get_db_session() as db:
await SystemSettingsService.reset_all_scans(db)
# Test get_or_create (should return record with all flags False after reset)
async with get_db_session() as db:
settings = await SystemSettingsService.get_or_create(db)
assert settings is not None