http-integration-testing
Installation
SKILL.md
HTTP Integration Testing
Writing integration tests that exercise a web app through its HTTP client (FastAPI
TestClient / starlette / httpx). Complements the RED-GREEN discipline in
test-driven-development; these are the framework behaviors that produce FALSE failures
when the app code is actually fine.
Gotcha 1 — TestClient follows redirects by default
httpx's TestClient follows 3xx responses by default. Asserting a redirect without
follow_redirects=False asserts against the FINAL page: a 303 → /accounts lands you
asserting 200 on the landing page while the side effect the redirect target performed
(the DB row written) is perfectly fine.
Symptom: "status 200 != 303" plus a confusing false alarm. Check follow_redirects before
debugging the app.