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

Function test_urllib3_pool_connection_closed

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

Source from the content-addressed store, hash-verified

2722
2723
2724def test_urllib3_pool_connection_closed(httpbin):
2725 s = requests.Session()
2726 s.mount("http://", HTTPAdapter(pool_connections=0, pool_maxsize=0))
2727
2728 try:
2729 s.get(httpbin("status/200"))
2730 except ConnectionError as e:
2731 assert "Pool is closed." in str(e)
2732
2733
2734class TestPreparingURLs:

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