mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +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:
@@ -4,7 +4,7 @@
|
||||
import json
|
||||
|
||||
import pytest
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
from assertions import assert_cassette_empty, assert_is_json_bytes
|
||||
|
||||
import vcr
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
@@ -195,11 +195,11 @@ def test_gzip(get_client, tmpdir, scheme):
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))):
|
||||
response = yield get(get_client(), url, **kwargs)
|
||||
assert_is_json(response.body)
|
||||
assert_is_json_bytes(response.body)
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join("gzip.yaml"))) as cass:
|
||||
response = yield get(get_client(), url, **kwargs)
|
||||
assert_is_json(response.body)
|
||||
assert_is_json_bytes(response.body)
|
||||
assert 1 == cass.play_count
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user