vcrpy
vcrpy copied to clipboard
Automatically mock your HTTP interactions to simplify and speed up testing
This PR enables brotli decompression of responses if it is available (via `brotli`, `brotlipy` or `brotlicffi`) I have added all three brotli variations to the test suite, but I'm at...
Hi! I have encountered some strange behaviors when using the library, which I would like to fix. ### 1 **Cassette isn't recording on status != 200**: - If you perform...
Hi! First of all, I wanted to thank you for this package and also for the new support to httpx! I think that we should support a JSON serializer for...
Encountered this myself, but this was reported in #550. I had generated some cassettes with _httplib2_, and then wanted to use them for _httpx_ - but they were entirely incompatible....
From the README: > If the server you are testing against ever changes its API, all you need to do is delete your existing cassette files, and run your tests...
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. -...
In case of httpx responce.body decompressed automatically by httpx. If we not remove "content-encoding" header here, vcr.filters.decode_response will try to decompress already decompressed body.
``` >>>from pathlib import Path >>>@vcr.use_cassette(Path('./my_path.yml')) >>>def test(): >>> pass TypeError: module, class, method, function, traceback, frame, or code object was expected, got WindowsPath ``` Using `Path` is a common...
Request bodies of content type `multipart/form-data` can have different "boundary" separators, but contain identical data. This can cause VCRPy's "body" matcher to fail on otherwise identical requests. This adds support...
Assert seems to behave badly in some cases and should not be used for handling runtime errors. See for example: https://medium.com/@jadhavmanoj/python-what-is-raise-and-assert-statement-c3908697bc62 https://github.com/emre/notes/blob/master/python/when-to-use-assert.md