MCPcopy
hub / github.com/urllib3/urllib3 / test_override_pool_kwargs_url

Method test_override_pool_kwargs_url

test/test_poolmanager.py:331–345  ·  view source on GitHub ↗

Assert overriding pool kwargs works with connection_from_url.

(self)

Source from the content-addressed store, hash-verified

329 assert pool1 is not pool2
330
331 def test_override_pool_kwargs_url(self) -> None:
332 """Assert overriding pool kwargs works with connection_from_url."""
333 p = PoolManager()
334 pool_kwargs = {"retries": 100, "block": True}
335
336 default_pool = p.connection_from_url("http://example.com/")
337 override_pool = p.connection_from_url(
338 "http://example.com/", pool_kwargs=pool_kwargs
339 )
340
341 assert retry.Retry.DEFAULT == default_pool.retries
342 assert not default_pool.block
343
344 assert 100 == override_pool.retries
345 assert override_pool.block
346
347 def test_override_pool_kwargs_host(self) -> None:
348 """Assert overriding pool kwargs works with connection_from_host"""

Callers

nothing calls this directly

Calls 2

connection_from_urlMethod · 0.95
PoolManagerClass · 0.90

Tested by

no test coverage detected