add architecture documentation and testing strategy

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-27 18:19:40 +02:00
parent 5ea568aaf6
commit 5e24215ffe
14 changed files with 537 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# Testing Strategy
The FastAPI backend will be tested using a combination of unit and integration tests.
## Unit Tests
- Use `pytest` with `pytest-asyncio` for async endpoint handlers.
- Mock external dependencies such as the DuckDB connection and the openrouter.ai API.
## Integration Tests
- Use `pytest-flask` to spin up the FastAPI app in a test client.
- Test full request/response cycles for authentication, user CRUD, and AI generation endpoints.
- Use an inmemory DuckDB instance for database tests.
## Test Coverage
- Aim for >80% coverage on the `app/` package.
- Generate coverage reports with `pytest-cov`.