Repository navigation
Testing Guide
github-actions[bot] edited this page Oct 28, 2026
·
9 revisions
uv run pytest # unit tests, with an 80% coverage floor
uv run pytest tests/unit/test_config.py -k env # a subset
RUN_INTEGRATION=1 uv run pytest -m integration # integration tests (real external systems)CI runs the unit tests on every supported Python version, together with ruff, mypy (strict), the wiki checks and the manifest checks. All of them block a merge.
| Path | What goes there |
|---|---|
tests/unit/ |
Fast and offline: no network, no real external systems. Most tests. |
tests/integration/ |
Real dependencies, marked @pytest.mark.integration; skipped unless RUN_INTEGRATION=1
|
tests/conftest.py |
Shared fixtures: clean_env (no MITM_PROXY_* leakage), write_config
|
- Every behaviour change needs a test that fails without it. A bug fix starts with the failing test.
- Assert outcomes (outputs, side effects, errors), not internal calls.
- Use placeholders for anything that looks real:
example.org,192.0.2.0/24, fake tokens. - Don't lower the coverage floor or skip a test to make CI pass.
mitm-proxy | Async Python MITM proxy with a self-signed CA — HTTP/1.1 & HTTP/2, pluggable middleware for inspecting and rewriting traffic in flight.
GitHub • Releases • Issues • Changelog • Contributing
This wiki is generated from docs/wiki/ on every push to main: edits made here are overwritten. Change it with a pull request.
- 🔍 Intercept only the hosts you list; tunnel the rest untouched
- 🔀 HTTP/1.1 and HTTP/2 on both sides, bridged
- 🧩 Python middleware: inspect, rewrite, answer or deny
- 🔐 Its own root CA; origins always verified
- 📈 Prometheus metrics and a read-only status API