'If no address is returned by GAI for a hostname, the connection attempt
fails with L{error.DNSLookupError}.'

def test_failure(self):

    endpoint = endpoints.HostnameEndpoint(deterministicResolvingReactor(Clock(), []), 'example.com', 80)
    clientFactory = object()
    dConnect = endpoint.connect(clientFactory)
    exc = self.failureResultOf(dConnect, error.DNSLookupError)
    self.assertIn('example.com', str(exc))
