'Test that channel request failure messages cause the Deferred to be
erred back.'

def test_CHANNEL_REQUEST_FAILURE(self):

    channel = TestChannel()
    self._openChannel(channel)
    d = self.conn.sendRequest(channel, 'test', '', True)
    self.conn.ssh_CHANNEL_FAILURE('\x00\x00\x00\x00')
    def check(result):
        self.assertEqual(result.value.value, 'channel    request    failed')
    d.addCallback(self.fail)
    d.addErrback(check)
    return d
