Last active
December 29, 2015 11:29
-
-
Save msabramo/7664462 to your computer and use it in GitHub Desktop.
Demonstration of a bug with VCRpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import requests | |
import vcr | |
with vcr.use_cassette('test_vcr.yaml'): | |
session = requests.session() | |
for i in range(1, 3): | |
print("Doing request #%d..." % (i,)) | |
resp = session.get('http://httpbin.org/get', headers={'Connection': 'close'}) | |
print("Got response #%d; headers = %r" % (i, resp.headers)) | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment