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:
2025-10-12 23:17:20 +02:00
parent 2867ebae09
commit 8fb4770161
6 changed files with 311 additions and 11 deletions

1
tests/__init__.py Normal file
View File

@@ -0,0 +1 @@
"""Test package for Aniworld application."""