mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
12 lines
408 B
Python
12 lines
408 B
Python
import urllib2
|
|
import vcr
|
|
|
|
|
|
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')
|
|
assert cass.requests[0].url == 'http://httpbin.org/redirect/3'
|
|
assert cass.requests[3].url == 'http://httpbin.org/get'
|
|
assert len(cass) == 4
|