Implement dependency injection system
- Enhanced existing src/server/utils/dependencies.py with optional SQLAlchemy import - Added comprehensive unit tests in tests/unit/test_dependencies.py - Created pytest configuration with asyncio support - Implemented SeriesApp singleton dependency with proper error handling - Added placeholders for database session and authentication dependencies - Updated infrastructure.md with dependency injection documentation - Completed dependency injection task from instructions.md Features implemented: - SeriesApp dependency with lazy initialization and singleton pattern - Configuration validation for anime directory - Comprehensive error handling for initialization failures - Common query parameters for pagination - Placeholder dependencies for future authentication and database features - 18 passing unit tests covering all dependency injection scenarios
This commit is contained in:
5
pyproject.toml
Normal file
5
pyproject.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
markers = [
|
||||
"asyncio: mark test as asynchronous"
|
||||
]
|
||||
Reference in New Issue
Block a user