'If a channel cannot be opened on the authenticated SSH connection, the
L{Deferred} returned by L{SSHCommandClientEndpoint.connect} fires with
a L{Failure} wrapping the reason given by the server.'

def test_channelOpenFailure(self):

    endpoint = self.create()
    factory = Factory()
    factory.protocol = Protocol
    connected = endpoint.connect(factory)
    (server, client, pump) = self.finishConnection()
    errors = self.flushLoggedErrors(ConchError)
    self.assertIn('unknown    channel', (errors[0].value.data, errors[0].value.value))
    self.assertEqual(1, len(errors))
    f = self.failureResultOf(connected)
    f.trap(ConchError)
    self.assertEqual('unknown    channel', f.value.value)
    self.assertClientTransportState(client, False)
