feat: Add backend tests with full cache initialization

- Add .env.test with test credentials and company config
- Add pytest fixtures for cache initialization (temp SQLite)
- Add test_api_real.py (18 tests) - API endpoint tests
- Add test_cache_real.py (8 tests) - Cache system tests
- Add test_services_real.py (9 tests) - Service layer tests
- Use company 110 (MARIUSM_AUTO) - only schema with full data in TEST

All 35 backend tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-21 23:10:11 +02:00
parent 12ac2b671e
commit 8e726eab62
7 changed files with 916 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
[pytest]
testpaths = .
python_files = test_*.py
python_classes = Test*
python_functions = test_*
asyncio_mode = auto
asyncio_default_fixture_loop_scope = session
markers =
oracle: Tests that require Oracle database connection
slow: Tests that take longer than 5 seconds
cache: Tests for cache system
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
# Default: run all tests
# Skip slow: pytest -m "not slow"
# Only Oracle: pytest -m oracle