'Test that channel requests that succeed send MSG_CHANNEL_SUCCESS.'

def test_CHANNEL_REQUEST_success(self):

    channel = TestChannel()
    self._openChannel(channel)
    self.conn.ssh_CHANNEL_REQUEST((('\x00\x00\x00\x00' + common.NS('test')) + '\x00'))
    self.assertEqual(channel.numberRequests, 1)
    d = self.conn.ssh_CHANNEL_REQUEST(((('\x00\x00\x00\x00' + common.NS('test')) + '\xff') + 'data'))
    def check(result):
        self.assertEqual(self.transport.packets, [(connection.MSG_CHANNEL_SUCCESS, '\x00\x00\x00\xff')])
    d.addCallback(check)
    return d
