'Test that compressed and encrypted packets are retrieved correctly.
See test_sendPacketBoth.'

def test_getPacketBoth(self):

    proto = MockTransportBase()
    proto.sendKexInit = (lambda : None)
    proto.makeConnection(self.transport)
    self.transport.clear()
    proto.currentEncryptions = MockCipher()
    proto.outgoingCompression = MockCompression()
    proto.incomingCompression = proto.outgoingCompression
    proto.sendPacket(ord('A'), 'BCDEFG')
    proto.buf = self.transport.value()
    self.assertEqual(proto.getPacket(), 'ABCDEFG')
