refactor: restructure core→server, split large entity files into database module

- Move src/core/ → src/server/
- Split SerieList.py (531 lines) and series.py (414 lines) into src/server/database/
- Add database/models.py for SQLAlchemy models
- Update all test imports to reflect new structure
- Remove deprecated test files (test_serie_class.py, test_serie_folder_with_year.py)
This commit is contained in:
2026-06-04 21:11:53 +02:00
parent 09d454d4c0
commit 5526ab884a
76 changed files with 1186 additions and 3574 deletions

View File

@@ -8,7 +8,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from src.core.providers.aniworld_provider import AniworldLoader
from src.server.providers.aniworld_provider import AniworldLoader
def _mock_response(content: str) -> MagicMock:
@@ -202,7 +202,7 @@ class TestEmptyResponses:
"""No season meta tag returns empty dict or zero."""
loader = _loader()
html_str = "<html><head></head><body></body></html>"
with patch("src.core.providers.aniworld_provider.requests.get", return_value=_mock_response(html_str)):
with patch("src.server.providers.aniworld_provider.requests.get", return_value=_mock_response(html_str)):
result = loader.get_season_episode_count("some-anime")
# Either empty dict or {1: 0} depending on implementation
assert isinstance(result, (dict, int))