MCPcopy
hub / github.com/urllib3/urllib3 / test_many_urls

Method test_many_urls

test/test_poolmanager.py:49–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 assert conn1 != conn2
48
49 def test_many_urls(self) -> None:
50 urls = [
51 "http://localhost:8081/foo",
52 "http://www.google.com/mail",
53 "http://localhost:8081/bar",
54 "https://www.google.com/",
55 "https://www.google.com/mail",
56 "http://yahoo.com",
57 "http://bing.com",
58 "http://yahoo.com/",
59 ]
60
61 connections = set()
62
63 p = PoolManager(10)
64
65 for url in urls:
66 conn = p.connection_from_url(url)
67 connections.add(conn)
68
69 assert len(connections) == 5
70
71 def test_manager_clear(self) -> None:
72 p = PoolManager(5)

Callers

nothing calls this directly

Calls 3

connection_from_urlMethod · 0.95
PoolManagerClass · 0.90
addMethod · 0.80

Tested by

no test coverage detected