]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
add the test from the readme
authorKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 04:42:09 +0000 (18:42 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 04:42:09 +0000 (18:42 -1000)
README.md
tests/integration/test_basic.py

index 3a18519f29380a0a264f9f6cc9145b116a5ea90b..cb24a77076d1cc10a0b14e41fd4ad4a72c2c8787 100644 (file)
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ import urllib2
 
 with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml'):
     response = urllib2.urlopen('http://www.iana.org/domains/reserved').read()
-    assert 'Example Domains' in response
+    assert 'Example domains' in response
 ```
 
 Run this test once, and VCR.py will record the http request to
index 5b26de70f08e2da26fa91e4114cd207af803553d..31fb6c664b1b8892d74d5320fad274059e0ce1d2 100644 (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