1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Adding json serializer

This commit is contained in:
shu zOMG chen
2013-08-18 21:43:14 -10:00
committed by Kevin McCarthy
parent 3e247a2efb
commit 51f0f1bacd
10 changed files with 134 additions and 55 deletions

View File

@@ -37,3 +37,9 @@ def test_basic_use(tmpdir):
with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml'):
response = urllib2.urlopen('http://www.iana.org/domains/reserved').read()
assert 'Example domains' in response
def test_basic_json_use(tmpdir):
'''Ensure you can load a json serialized cassette'''
with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.json', serializer='json'):
response = urllib2.urlopen('http://www.iana.org/domains/reserved').read()
assert 'Example domains' in response