3 ms·
VCR.py (https://github.com/kevin1024/vcrpy https://github.com/kevin1024/vcrpy) is a great utility for mocking APIs. It will run each request once, save the resp
by tmarice 6y ago
VCR.py (https://github.com/kevin1024/vcrpy https://github.com/kevin1024/vcrpy) is a great utility for mocking APIs.
It will run each request once, save the responses to YAML files, and then replay the responses every time you re-run the tests. It's also very useful for caching API responses (e.g. you have a trial account with limited number of requests).
Unfortunately, if used for testing, it will not cover the case when the original API changes its interface.