Record and replay HTTP fixtures for deterministic Python tests with VCR.py
Use VCR.py when an agent needs to turn flaky, slow, or rate-limited Python tests into stable runs by recording real HTTP interactions once and replaying them from cassette files. The agent decides which requests belong in fixtures, refreshes stale cassettes when upstream APIs change, and keeps external traffic out of the repeat test loop.
Prerequisites
Python plus VCR.py integrated into the project's test framework
Installation
Requirements and caveats from upstream:
- |PyPI| |Python versions| |Build Status| |CodeCov| |Gitter|
- This is a Python version of Ruby's VCR
- :target: https://pypi.python.org/pypi/vcrpy
Basic usage or getting-started notes:
first time you run code that is inside a VCR.py context manager or
recognizes from the original test run and return the responses that
to do is delete your existing cassette files, and run your tests again.
Extracted from upstream docs: https://raw.githubusercontent.com/kevin1024/vcrpy/HEAD/README.rst