diff --git a/tests/test_adapters.py b/tests/test_adapters.py index 97e28c797c..6c55d5a130 100644 --- a/tests/test_adapters.py +++ b/tests/test_adapters.py @@ -4,4 +4,5 @@ def test_request_url_trims_leading_path_separators(): """See also https://github.com/psf/requests/issues/6643.""" a = requests.adapters.HTTPAdapter() - assert "/v:h" == a.request_url("http://127.0.0.1:10000//v:h", {}) + p = requests.Request(method="GET", url="http://127.0.0.1:10000//v:h").prepare() + assert "/v:h" == a.request_url(p, {})