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

Add Python 2.3 support

This commit also adds the 'six' dependency
This commit is contained in:
Åsmund Grammeltvedt
2014-02-02 21:53:12 +01:00
committed by Kevin McCarthy
parent 2385176084
commit a73da71159
25 changed files with 296 additions and 122 deletions

View File

@@ -1,11 +1,11 @@
import urllib2
import vcr
from vcr._compat import urlopen
def test_recorded_request_url_with_redirected_request(tmpdir):
with vcr.use_cassette(str(tmpdir.join('test.yml'))) as cass:
assert len(cass) == 0
urllib2.urlopen('http://httpbin.org/redirect/3')
urlopen('http://httpbin.org/redirect/3')
assert cass.requests[0].url == 'http://httpbin.org/redirect/3'
assert cass.requests[3].url == 'http://httpbin.org/get'
assert len(cass) == 4