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

Add support for configurable record modes

This support will let you select one of four different behaviors
for VCR's cassettes.  Closes #23
This commit is contained in:
Kevin McCarthy
2013-09-15 16:44:50 -10:00
parent 5ce67dc023
commit 03c22d79dd
7 changed files with 169 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ def test_disk_saver_write(tmpdir):
# the mtime doesn't change
time.sleep(1)
with vcr.use_cassette(fname) as cass:
with vcr.use_cassette(fname, record_mode='any') as cass:
urllib2.urlopen('http://www.iana.org/domains/reserved').read()
urllib2.urlopen('http://httpbin.org/').read()
assert cass.play_count == 1