mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 09:35:34 +00:00
assertions.py: Fix mis-leading assert_is_json
Parameter name "a_string" was mistaken and function name "assert_is_json" was less clear than ideal, given that it explicitly needs bytes unlike json.loads .
This commit is contained in:
@@ -2,7 +2,7 @@ import http.client as httplib
|
||||
import json
|
||||
import zlib
|
||||
|
||||
from assertions import assert_is_json
|
||||
from assertions import assert_is_json_bytes
|
||||
|
||||
import vcr
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_original_decoded_response_is_not_modified(tmpdir, httpbin):
|
||||
inside = conn.getresponse()
|
||||
|
||||
assert "content-encoding" not in inside.headers
|
||||
assert_is_json(inside.read())
|
||||
assert_is_json_bytes(inside.read())
|
||||
|
||||
|
||||
def _make_before_record_response(fields, replacement="[REDACTED]"):
|
||||
|
||||
Reference in New Issue
Block a user