Beyond Mocking: Record Real API Responses Once with VCR for Fast pytest Runs

KhuyenTran16 · x · 2026-09-22

Mocks make tests fast but never verify how your code handles a real API response. The author presents VCR: record one real GitHub API response, save it as a cassette, and replay it in future pytest runs — real data, no live network calls. Using a small GitHub API client, the article compares mocks, VCR tests, and live smoke tests.

Original post →

More from coding & agent

coding & agent channel →