MCPcopy
hub / github.com/urllib3/urllib3 / test_double_getresponse

Function test_double_getresponse

test/with_dummyserver/test_connection.py:70–77  ·  view source on GitHub ↗
(pool: HTTPConnectionPool)

Source from the content-addressed store, hash-verified

68
69
70def test_double_getresponse(pool: HTTPConnectionPool) -> None:
71 with contextlib.closing(pool._get_conn()) as conn:
72 conn.request("GET", "/")
73 _ = conn.getresponse()
74
75 # Calling getrepsonse() twice should cause an error
76 with pytest.raises(ResponseNotReady):
77 conn.getresponse()
78
79
80def test_connection_state_properties(pool: HTTPConnectionPool) -> None:

Callers

nothing calls this directly

Calls 3

_get_connMethod · 0.80
requestMethod · 0.45
getresponseMethod · 0.45

Tested by

no test coverage detected