diff --git a/tests/integration/test_httpx.py b/tests/integration/test_httpx.py index a69b6c44..723daed7 100644 --- a/tests/integration/test_httpx.py +++ b/tests/integration/test_httpx.py @@ -286,6 +286,7 @@ def test_stream(tmpdir, httpbin, do_request): assert len(cassette_content) == 512 assert cassette.play_count == 1 + @pytest.mark.online def test_text_content_type(tmpdir, httpbin, do_request): url = httpbin.url + "/json" @@ -297,7 +298,8 @@ def test_text_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'], str) + assert isinstance(cassette.responses[0]["content"], str) + @pytest.mark.online def test_binary_content_type(tmpdir, httpbin, do_request): @@ -310,4 +312,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) + assert isinstance(cassette.responses[0]["content"], bytes) diff --git a/vcr/stubs/httpx_stubs.py b/vcr/stubs/httpx_stubs.py index 140c0aba..4d4b96a0 100644 --- a/vcr/stubs/httpx_stubs.py +++ b/vcr/stubs/httpx_stubs.py @@ -33,7 +33,6 @@ def _transform_headers(httpx_response): return out - def _to_serialized_response(httpx_response): try: content = httpx_response.content.decode("utf-8")