1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 01:25:34 +00:00

fix tests

This commit is contained in:
Parker Hancock
2023-12-08 10:49:29 -06:00
committed by Jair Henrique
parent e8e9a4af9f
commit f5fc7aac22
14 changed files with 101 additions and 112 deletions

View File

@@ -56,14 +56,14 @@ def test_response_headers(tmpdir, httpbin_both):
@pytest.mark.online
def test_effective_url(tmpdir):
def test_effective_url(tmpdir, httpbin):
"""Ensure that the effective_url is captured"""
url = "http://mockbin.org/redirect/301"
url = httpbin.url + "/redirect-to?url=.%2F&status_code=301"
with vcr.use_cassette(str(tmpdir.join("headers.yaml"))):
resp, _ = http().request(url)
effective_url = resp["content-location"]
assert effective_url == "http://mockbin.org/redirect/301/0"
assert effective_url == httpbin.url + "/"
with vcr.use_cassette(str(tmpdir.join("headers.yaml"))):
resp, _ = http().request(url)