MCPcopy
hub / github.com/psf/requests / test_urllib3_retries

Function test_urllib3_retries

tests/test_requests.py:2714–2721  ·  view source on GitHub ↗
(httpbin)

Source from the content-addressed store, hash-verified

2712
2713
2714def test_urllib3_retries(httpbin):
2715 from urllib3.util import Retry
2716
2717 s = requests.Session()
2718 s.mount("http://", HTTPAdapter(max_retries=Retry(total=2, status_forcelist=[500])))
2719
2720 with pytest.raises(RetryError):
2721 s.get(httpbin("status/500"))
2722
2723
2724def test_urllib3_pool_connection_closed(httpbin):

Callers

nothing calls this directly

Calls 4

mountMethod · 0.95
getMethod · 0.95
HTTPAdapterClass · 0.90
httpbinFunction · 0.85

Tested by

no test coverage detected