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

Function go

tests/test_resolver.py:40–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38def test_async_resolver_positive_lookup(loop):
39 @asyncio.coroutine
40 def go():
41 with patch('aiodns.DNSResolver.query') as mock_query:
42 mock_query.return_value = fake_result(['127.0.0.1'])
43 resolver = AsyncResolver(loop=loop)
44 real = yield from resolver.resolve('www.python.org')
45 ipaddress.ip_address(real[0]['host'])
46 loop.run_until_complete(go())
47
48

Calls 7

resolveMethod · 0.95
resolveMethod · 0.95
AsyncResolverClass · 0.90
DefaultResolverClass · 0.90
patchFunction · 0.85
fake_resultFunction · 0.85
fake_addrinfoFunction · 0.85

Tested by

no test coverage detected