1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Fix format code

This commit is contained in:
Jair Henrique
2023-12-12 13:32:49 -03:00
parent 85ae012d9c
commit 88cf01aa14
2 changed files with 4 additions and 3 deletions

View File

@@ -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)

View File

@@ -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")