Skip to content

Instantly share code, notes, and snippets.

@msabramo
Last active December 29, 2015 11:29
Show Gist options
  • Save msabramo/7664462 to your computer and use it in GitHub Desktop.
Save msabramo/7664462 to your computer and use it in GitHub Desktop.
Demonstration of a bug with VCRpy
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