mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
test serializers.compat.convert_to_bytes()
This commit is contained in:
committed by
Kevin McCarthy
parent
9c275dd86a
commit
a8f1a65d62
@@ -4,7 +4,7 @@ import pytest
|
||||
from vcr.compat import mock
|
||||
from vcr.request import Request
|
||||
from vcr.serialize import deserialize, serialize
|
||||
from vcr.serializers import yamlserializer, jsonserializer
|
||||
from vcr.serializers import yamlserializer, jsonserializer, compat
|
||||
|
||||
|
||||
def test_deserialize_old_yaml_cassette():
|
||||
@@ -131,3 +131,8 @@ def test_serialize_binary_request():
|
||||
)
|
||||
except (UnicodeDecodeError, TypeError) as exc:
|
||||
assert msg in str(exc)
|
||||
|
||||
def test_deserialize_no_body_string():
|
||||
data = {'body': {'string': None}}
|
||||
output = compat.convert_to_bytes(data)
|
||||
assert data == output
|
||||
|
||||
Reference in New Issue
Block a user