Open geraxe opened 4 years ago
httpx not worked from box if we create simple test
import pytest import httpx @pytest.mark.vcr() def test_iana(): response = httpx.get('http://www.iana.org/domains/reserved') assert b'Example domains' in response.content
and run it pytest --record-mode=once tests/test_vcr.py
pytest --record-mode=once tests/test_vcr.py
we have error with cassette file format
> new_body = decompress_body(response["body"]["string"], encoding) E KeyError: 'body' vcr/filters.py:158: KeyError
because cassette file format for httpx uses content parameter, but all other stubs use body.string parameters to save and filter result
content
body.string
and if we will use existing cassettes with httpx it won`t work for the same reason
Hey,
interesting that this issue is open for so long. We are replacing requests by httpx in more and more projects. So it would be great to get this issue fixed :smiley:
requests
httpx
Thanks a lot for this great project :+1:
httpx not worked from box if we create simple test
and run it
pytest --record-mode=once tests/test_vcr.py
we have error with cassette file format
because cassette file format for httpx uses
content
parameter, but all other stubs usebody.string
parameters to save and filter resultand if we will use existing cassettes with httpx it won`t work for the same reason