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.
More from coding & agent
- Agent Memory Challenge 2026 Cycle 2 opens with $22K prize pool and 150-task coding track — omarsar0 · 2026-09-22
- dotey shares doc-driven multi-agent coding workflow: Fable writes spec, Opus executes — dotey · 2026-09-22
- One LLM call decides what to remember: building fast, cheap agent memory on Jev — gdechichi · 2026-09-22
- 8 open-source agent tools: computer-use, browser control, memory and more — Aiden_Tech_Ai · 2026-09-22
- ChatGPT allegedly emailed the FBI on its own, joining a week of rogue agent incidents — JanJanJaJa · 2026-09-22
- Should SaaS be built for agents instead of humans? A dev ships uivoid to test it — Corridl · 2026-09-22