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

Function fake_addrinfo

tests/test_resolver.py:25–34  ·  view source on GitHub ↗
(hosts)

Source from the content-addressed store, hash-verified

23
24
25def fake_addrinfo(hosts):
26 @asyncio.coroutine
27 def fake(*args, **kwargs):
28 if not hosts:
29 raise socket.gaierror
30
31 return list([(None, None, None, None, [h, 0])
32 for h in hosts])
33
34 return fake
35
36
37@pytest.mark.skipif(aiodns is None, reason="aiodns required")

Callers 1

goFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected