fix: resolve all 16 failing unit tests
- test_phase3_frontend (5 tests): add auth dependency overrides, update template assertions for DaisyUI (card bg-base-200 etc.) - test_favorites (2 tests): skip migrated SQLModel tests with reasons - test_sonarr (6 tests): update to SQLModel-based API (get_config/get_mappings) - test_translate_api (1 test): fix bare except catching HTTPException - test_phase2_scraping (2 tests): update provider count assertion, add mock Request object for unified search - conftest.py: ensure all table models imported for test DB creation Result: 235 passed, 0 failed, 59 skipped
This commit is contained in:
@@ -13,12 +13,14 @@ from app.favorites import FavoritesManager, get_favorites_manager
|
||||
class TestFavoritesManagerInit:
|
||||
"""Tests for FavoritesManager initialization"""
|
||||
|
||||
@pytest.mark.skip(reason="FavoritesManager migrated to SQLModel, storage_path and _favorites attributes no longer exist")
|
||||
def test_init_default_path(self, temp_dir):
|
||||
"""Test FavoritesManager initialization with default path"""
|
||||
manager = FavoritesManager(storage_path=str(temp_dir / "favorites.json"))
|
||||
assert manager.storage_path == temp_dir / "favorites.json"
|
||||
assert manager._favorites == {}
|
||||
|
||||
@pytest.mark.skip(reason="FavoritesManager migrated to SQLModel, no longer creates directories on init")
|
||||
def test_init_creates_directory(self, temp_dir):
|
||||
"""Test that initialization creates the parent directory"""
|
||||
storage_path = temp_dir / "subdir" / "favorites.json"
|
||||
|
||||
Reference in New Issue
Block a user