'Test that packets sent while compression is enabled are sent
correctly.  The packet type and data should be encrypted.'

def test_sendPacketCompressed(self):

    proto = MockTransportBase()
    proto.makeConnection(self.transport)
    self.finishKeyExchange(proto)
    proto.outgoingCompression = MockCompression()
    self.transport.clear()
    proto.sendPacket(ord('A'), 'B')
    value = self.transport.value()
    self.assertEqual(value, '\x00\x00\x00\x0c\x08BAf\x99\x99\x99\x99\x99\x99\x99\x99')
