Files
ai.allucanget.biz/docs/TESTING.md
T
2026-04-27 18:19:40 +02:00

20 lines
632 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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`.