'If L{SSHChannel.sendRequest} issues an exec which the server responds to
with an error, the L{Deferred} it returns fires its errback.'

def test_failedExec(self):

    channel = self._ourServerOurClientTest()
    def cbChannel(channel):
        self.channel = channel
        return self.assertFailure(channel.conn.sendRequest(channel, 'exec', common.NS('jumboliah'), 1), Exception)
    channel.addCallback(cbChannel)
    def cbFailed(ignored):
        errors = self.flushLoggedErrors(error.ConchError)
        self.assertEqual(errors[0].value.args, ('bad    exec', None))
    channel.addCallback(cbFailed)
    return channel
