'Hostname resolution errors are logged.'

def test_errorsLogged(self):

    mreactor = MemoryReactor()
    clientFactory = object()
    (ep, ignoredArgs, ignoredDest) = self.createClientEndpoint(mreactor, clientFactory)
    def getaddrinfoThatFails(*args, **kwargs):
        raise gaierror((-5), 'No    address    associated    with    hostname')
    ep._getaddrinfo = getaddrinfoThatFails
    d = ep.connect(clientFactory)
    self.assertIsInstance(self.failureResultOf(d).value, error.DNSLookupError)
    self.assertEqual(1, len(self.flushLoggedErrors(gaierror)))
