From 3c7b79178358865fd36413b86a108b290026a4b9 Mon Sep 17 00:00:00 2001 From: Jair Henrique Date: Tue, 2 Nov 2021 21:11:12 -0300 Subject: [PATCH] Fix httplib2 tests --- tests/integration/test_httplib2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_httplib2.py b/tests/integration/test_httplib2.py index f5ce7c0..f7c06eb 100644 --- a/tests/integration/test_httplib2.py +++ b/tests/integration/test_httplib2.py @@ -61,13 +61,14 @@ def test_response_headers(tmpdir, httpbin_both): assert set(headers) == set(resp.items()) -def test_effective_url(tmpdir, httpbin_both): +def test_effective_url(tmpdir): """Ensure that the effective_url is captured""" - url = httpbin_both.url + "/redirect-to?url=/html" + url = "http://mockbin.org/redirect/301" + with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): resp, _ = http().request(url) effective_url = resp["content-location"] - assert effective_url == httpbin_both + "/html" + assert effective_url == "http://mockbin.org/redirect/301/0" with vcr.use_cassette(str(tmpdir.join("headers.yaml"))): resp, _ = http().request(url)