'Test that compressed packets are retrieved correctly.  See
test_sendPacketCompressed.'

def test_getPacketCompressed(self):

    proto = MockTransportBase()
    proto.makeConnection(self.transport)
    self.finishKeyExchange(proto)
    self.transport.clear()
    proto.outgoingCompression = MockCompression()
    proto.incomingCompression = proto.outgoingCompression
    proto.sendPacket(ord('A'), 'BCD')
    proto.buf = self.transport.value()
    self.assertEqual(proto.getPacket(), 'ABCD')
