diff --git a/tests/integration/test_httpx.py b/tests/integration/test_httpx.py index f1661574..a69b6c44 100644 --- a/tests/integration/test_httpx.py +++ b/tests/integration/test_httpx.py @@ -298,7 +298,7 @@ def test_text_content_type(tmpdir, httpbin, do_request): assert cassette_response.content == response.content assert cassette.play_count == 1 assert isinstance(cassette.responses[0]['content'], str) - + @pytest.mark.online def test_binary_content_type(tmpdir, httpbin, do_request): url = httpbin.url + "/bytes/1024" @@ -310,4 +310,4 @@ def test_binary_content_type(tmpdir, httpbin, do_request): cassette_response = do_request()("GET", url) assert cassette_response.content == response.content assert cassette.play_count == 1 - assert isinstance(cassette.responses[0]['content'], bytes) \ No newline at end of file + assert isinstance(cassette.responses[0]['content'], bytes) diff --git a/vcr/stubs/httpx_stubs.py b/vcr/stubs/httpx_stubs.py index ddf8e03c..140c0aba 100644 --- a/vcr/stubs/httpx_stubs.py +++ b/vcr/stubs/httpx_stubs.py @@ -39,7 +39,7 @@ def _to_serialized_response(httpx_response): content = httpx_response.content.decode("utf-8") except UnicodeDecodeError: content = httpx_response.content - + return { "status_code": httpx_response.status_code, "http_version": httpx_response.http_version,