(hosts)
| 23 | |
| 24 | |
| 25 | def 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") |