mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
add test for redirects
This commit is contained in:
9
tests/integration/test_request.py
Normal file
9
tests/integration/test_request.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import urllib2
|
||||||
|
import vcr
|
||||||
|
|
||||||
|
def test_recorded_request_url_with_redirected_request(tmpdir):
|
||||||
|
with vcr.use_cassette(str(tmpdir.join('test.yml'))) as cass:
|
||||||
|
urllib2.urlopen('http://google.com')
|
||||||
|
assert cass.requests[0].url == 'http://google.com'
|
||||||
|
assert cass.requests[1].url == 'http://www.google.com/'
|
||||||
|
assert len(cass) == 2
|
||||||
Reference in New Issue
Block a user