'An L{SSHChannel} can be configured with a maximum packet size to
receive.'

def test_maxPacket(self):

    channel = self._ourServerOurClientTest(localWindow=11, localMaxPacket=1)
    def cbChannel(channel):
        self.channel = channel
        return channel.conn.sendRequest(channel, 'exec', common.NS('secho    hello'), 1)
    channel.addCallback(cbChannel)
    def cbExec(ignored):
        return self.channel.onClose
    channel.addCallback(cbExec)
    def cbClosed(ignored):
        self.assertEqual(self.channel.status, 0)
        self.assertEqual(''.join(self.channel.received), 'hello\r\n')
        self.assertEqual(''.join(self.channel.receivedExt), 'hello\r\n')
        self.assertEqual(self.channel.localWindowLeft, 11)
        self.assertTrue(self.channel.eofCalled)
    channel.addCallback(cbClosed)
    return channel
