mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +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:
@@ -1,6 +1,6 @@
|
||||
"""Test requests' interaction with vcr"""
|
||||
import pytest
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
from assertions import assert_cassette_empty, assert_is_json_bytes
|
||||
|
||||
import vcr
|
||||
|
||||
@@ -176,7 +176,7 @@ def test_gzip__decode_compressed_response_false(tmpdir, httpbin_both):
|
||||
with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))):
|
||||
response = requests.get(httpbin_both + "/gzip")
|
||||
assert response.headers["content-encoding"] == "gzip" # i.e. not removed
|
||||
assert_is_json(response.content) # i.e. uncompressed bytes
|
||||
assert_is_json_bytes(response.content) # i.e. uncompressed bytes
|
||||
|
||||
|
||||
def test_gzip__decode_compressed_response_true(tmpdir, httpbin_both):
|
||||
|
||||
Reference in New Issue
Block a user