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

add the test from the readme

This commit is contained in:
Kevin McCarthy
2013-08-11 18:42:09 -10:00
parent 5c0a1e1769
commit 9d8084113d
2 changed files with 8 additions and 1 deletions

View File

@@ -30,3 +30,10 @@ def test_unpatch(tmpdir):
urllib2.urlopen('http://httpbin.org/').read()
assert cass.play_count == 0
def test_basic_use(tmpdir):
'''
Copied from the docs
'''
with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml'):
response = urllib2.urlopen('http://www.iana.org/domains/reserved').read()
assert 'Example domains' in response