Use xfail marker for a test expected to fail without Internet connection

This is only a minor improvement on the great work of
https://github.com/kennethreitz/requests/pull/2859 that permits to run
tests on hosts without Internet connection.
This commit is contained in:
Daniele Tricoli
2016-05-29 20:10:37 +02:00
parent 9e9d2c6521
commit 5e86103387
+1
View File
@@ -1107,6 +1107,7 @@ class TestRequests:
preq = req.prepare()
assert test_url == preq.url
@pytest.mark.xfail(raises=ConnectionError)
def test_auth_is_stripped_on_redirect_off_host(self, httpbin):
r = requests.get(
httpbin('redirect-to'),