Backend (pytest)
Configuration: agency-django/pyproject.toml → [tool.pytest.ini_options].
Collection is limited to tests/test_*.py — Django management commands named *_test.py are never picked up.
Settings
Context |
|
|---|---|
Local / CI pytest |
|
|
|
CI checks out agency-django only (private repos — no agency-server submodule).
Layout
Path |
Role |
|---|---|
|
Standalone Django settings
Routes |
Markers
@pytest.mark.unit— default fast tests@pytest.mark.integration— multi-component flows, mocked LLM@pytest.mark.docker— real stack smoke (deselected unless-m docker)
Default addopts excludes docker (-m "not docker").
Commands
Command |
Description |
|---|---|
|
Local SQLite suite (no Docker) |
|
pytest inside |
|
Runtime / HITL / Celery (mocked LLM) |
|
|
Coverage
pytest --cov=agency with fail_under = 35 in pyproject.toml.
GitHub Actions (~36% on ubuntu-latest; ~44% in Docker dev stack). Target 40%.
Workflow: agency-django/.github/workflows/tests.yml — see Continuous integration.