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:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user