Spaces:
Sleeping
Sleeping
File size: 554 Bytes
0ddf928 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Testing strategy
## Test levels
- `tests/unit`: pure business logic, mocks only.
- `tests/integration`: Prisma repositories against local Supabase DB.
- `tests/e2e`: full HTTP flow via FastAPI app.
## Markers
- `@pytest.mark.unit`
- `@pytest.mark.integration`
- `@pytest.mark.e2e`
## Commands
```bash
pytest -m unit
pytest -m integration
pytest -m e2e
pytest -m "not integration"
```
## Fixtures
- `prisma`: shared Prisma connection for tests.
- `app`: FastAPI app with DB dependency override.
- `client`: HTTPX async client bound to ASGI app.
|