vcrpy
vcrpy copied to clipboard
Automatically mock your HTTP interactions to simplify and speed up testing
For a learning project I'm writing a web scraper with tests. In the following example it works as expected with the commented out line but requests inside the CrawlerProcess/Twisted Reactor...
https://github.com/kevin1024/vcrpy/blob/4a8e80ee3e288c61a85a90d7f13c83d9e9a4db2e/vcr/cassette.py#L190 This line clutters logs with: ``` TypeError: Object of type 'function' is not JSON serializable Call stack: File "/usr/local/bin/nosetests", line 10, in sys.exit(run_exit()) File "/usr/local/lib/python3.6/site-packages/nose/core.py", line 121, in __init__...
Just ran into an issue where I was receiving 599 status code. Digging into the source revealed it means `No match for the request {!r} was found. Can't overwrite existing...
I notice your use of PyYaml is not pinned at any particular version. Will any version of PyYaml work? We have other dependencies in our project that rely on specific...
When using the `filter_query_parameters` argument, the aiohttp stub still records the full url given by the response object for later reconstruction of the yarl response. This is an unexpected behavior...
`replace_post_data_parameters` always separates the key/value pairs based on `&`. However, for multipart form data, the separator is defined by the boundary parameter in the `Content-Type` header, and we should not...
It would be convenient to be able to filter based on regular expressions so we can maintain a list of patterns instead of a list of exceptions. For example: ```python...
Here's my example test file: ```python import docker import vcr #@vcr.use_cassette() def test_docker_images(): env = docker.from_env() images = env.images.list() assert images ``` The test works fine, but if I'll uncomment...
Is there a way for VCR.py to mock/fake network errors? I'd love to use it for negative tests as well as functional tests.
https://github.com/agriffis/vcrpy-unittest adds a `VCRTestCase` (and a `VCRMixin`) class. They consists only of 23 lines of code. Please include those two functions in your project to avoid needing to install another...