def test_sendKexInit(self):
        """
        Test that the KEXINIT (key exchange initiation) message is sent
        correctly.  Payload::
            bytes[16] cookie
            string key exchange algorithms
            string public key algorithms
            string outgoing ciphers
            string incoming ciphers
            string outgoing MACs
            string incoming MACs
            string outgoing compressions
            string incoming compressions
            bool first packet follows
            uint32 0
        """
        value = self.transport.value().split(b'\r\n', 1)[1]
        self.proto.buf = value
        packet = self.proto.getPacket()
        self.assertEqual(packet[0:1], chr(transport.MSG_KEXINIT))
        self.assertEqual(packet[1:17], b'\x99' * 16)
        (keyExchanges, pubkeys, ciphers1, ciphers2, macs1, macs2,
         compressions1, compressions2, languages1, languages2,
         buf) = common.getNS(packet[17:], 10)

        self.assertEqual(
            keyExchanges, b','.join(self.proto.supportedKeyExchanges))
        self.assertEqual(pubkeys, b','.join(self.proto.supportedPublicKeys))
        self.assertEqual(ciphers1, b','.join(self.proto.supportedCiphers))
        self.assertEqual(ciphers2, b','.join(self.proto.supportedCiphers))
        self.assertEqual(macs1, b','.join(self.proto.supportedMACs))
        self.assertEqual(macs2, b','.join(self.proto.supportedMACs))
        self.assertEqual(compressions1,
                         b','.join(self.proto.supportedCompressions))
        self.assertEqual(compressions2,
                         b','.join(self.proto.supportedCompressions))
        self.assertEqual(languages1, b','.join(self.proto.supportedLanguages))
        self.assertEqual(languages2, b','.join(self.proto.supportedLanguages))
        self.assertEqual(buf, b'\x00' * 5)

        Test that the KEXINIT (key exchange initiation) message is sent
        correctly.  Payload::
            bytes[16] cookie
            string key exchange algorithms
            string public key algorithms
            string outgoing ciphers
            string incoming ciphers
            string outgoing MACs
            string incoming MACs
            string outgoing compressions
            string incoming compressions
            bool first packet follows
            uint32 0
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py