mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
start adding config tests
This commit is contained in:
14
tests/integration/test_config.py
Normal file
14
tests/integration/test_config.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import json
|
||||
import urllib2
|
||||
import vcr
|
||||
|
||||
def test_set_serializer_default_config(tmpdir):
|
||||
my_vcr = vcr.VCR(serializer='json')
|
||||
|
||||
with my_vcr.use_cassette(str(tmpdir.join('test.json'))) as cass:
|
||||
assert my_vcr.serializer == 'json'
|
||||
urllib2.urlopen('http://httpbin.org/get')
|
||||
|
||||
with open(str(tmpdir.join('test.json'))) as f:
|
||||
assert json.loads(f.read())
|
||||
|
||||
Reference in New Issue
Block a user