- Implemented comprehensive test suite for NFO service - 73 unit tests covering: - FSK rating extraction from German content ratings - Year extraction from series names with parentheses - TMDB to NFO model conversion - NFO file creation with TMDB integration - NFO file updates with media refresh - Media file downloads (poster, logo, fanart) - NFO ID parsing (TMDB, TVDB, IMDb) - Edge cases for empty data, malformed XML, missing fields - Configuration options (image sizes, auto-create) - File cleanup and close operations Coverage: 90.65% (target: 80%+) - Statements covered: 202/222 - Branches covered: 79/88 Test results: All 73 tests passing - Mocked TMDB API client and image downloader - Used AsyncMock for async operations - Tested both success and error paths - Verified concurrent operations work correctly - Validated XML parsing and ID extraction
48 KiB
48 KiB