MCPcopy
hub / github.com/aio-libs/aiohttp / test_dns_error

Function test_dns_error

tests/test_connector.py:1575–1586  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

1573
1574
1575async def test_dns_error(loop) -> None:
1576 connector = aiohttp.TCPConnector(loop=loop)
1577 connector._resolve_host = mock.AsyncMock(
1578 side_effect=OSError("dont take it serious")
1579 )
1580
1581 req = ClientRequest("GET", URL("http://www.python.org"), loop=loop)
1582
1583 with pytest.raises(aiohttp.ClientConnectorError):
1584 await connector.connect(req, [], ClientTimeout())
1585
1586 await connector.close()
1587
1588
1589async def test_get_pop_empty_conns(loop) -> None:

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
ClientRequestClass · 0.90
ClientTimeoutClass · 0.90
connectMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…