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

fix linting

This commit is contained in:
Parker Hancock
2023-12-12 09:14:36 -06:00
committed by Jair Henrique
parent db1e9e7180
commit 85ae012d9c
2 changed files with 3 additions and 3 deletions

View File

@@ -298,7 +298,7 @@ def test_text_content_type(tmpdir, httpbin, do_request):
assert cassette_response.content == response.content assert cassette_response.content == response.content
assert cassette.play_count == 1 assert cassette.play_count == 1
assert isinstance(cassette.responses[0]['content'], str) assert isinstance(cassette.responses[0]['content'], str)
@pytest.mark.online @pytest.mark.online
def test_binary_content_type(tmpdir, httpbin, do_request): def test_binary_content_type(tmpdir, httpbin, do_request):
url = httpbin.url + "/bytes/1024" url = httpbin.url + "/bytes/1024"
@@ -310,4 +310,4 @@ def test_binary_content_type(tmpdir, httpbin, do_request):
cassette_response = do_request()("GET", url) cassette_response = do_request()("GET", url)
assert cassette_response.content == response.content assert cassette_response.content == response.content
assert cassette.play_count == 1 assert cassette.play_count == 1
assert isinstance(cassette.responses[0]['content'], bytes) assert isinstance(cassette.responses[0]['content'], bytes)

View File

@@ -39,7 +39,7 @@ def _to_serialized_response(httpx_response):
content = httpx_response.content.decode("utf-8") content = httpx_response.content.decode("utf-8")
except UnicodeDecodeError: except UnicodeDecodeError:
content = httpx_response.content content = httpx_response.content
return { return {
"status_code": httpx_response.status_code, "status_code": httpx_response.status_code,
"http_version": httpx_response.http_version, "http_version": httpx_response.http_version,