5e24215ffe
Co-authored-by: Copilot <copilot@github.com>
632 B
632 B
Testing Strategy
The FastAPI backend will be tested using a combination of unit and integration tests.
Unit Tests
- Use
pytestwithpytest-asynciofor async endpoint handlers. - Mock external dependencies such as the DuckDB connection and the openrouter.ai API.
Integration Tests
- Use
pytest-flaskto spin up the FastAPI app in a test client. - Test full request/response cycles for authentication, user CRUD, and AI generation endpoints.
- Use an in‑memory DuckDB instance for database tests.
Test Coverage
- Aim for >80 % coverage on the
app/package. - Generate coverage reports with
pytest-cov.