'L{smtp.SMTPClient.timeoutConnection} calls the C{sendError} hook with a
fatal L{SMTPTimeoutError} with the current line log.'

def test_timeoutConnection(self):

    errors = []
    client = MySMTPClient()
    client.sendError = errors.append
    client.makeConnection(StringTransport())
    client.lineReceived('220    hello')
    client.timeoutConnection()
    self.assertIsInstance(errors[0], smtp.SMTPTimeoutError)
    self.assertTrue(errors[0].isFatal)
    self.assertEqual(bytes(errors[0]), 'Timeout    waiting    for    SMTP    server    response\n<<<    220    hello\n>>>    HELO    foo.baz\n')
