def test_KEXINITMultipleAlgorithms(self):
        """
        Receiving a KEXINIT packet listing multiple supported
        algorithms will set up the first common algorithm, ordered after our
        preference.
        """
        self.proto.dataReceived(
            b'SSH-2.0-Twisted\r\n\x00\x00\x01\xf4\x04\x14'
            b'\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99'
            b'\x99\x00\x00\x00bdiffie-hellman-group1-sha1,diffie-hellman-g'
            b'roup-exchange-sha1,diffie-hellman-group-exchange-sha256\x00'
            b'\x00\x00\x0fssh-dss,ssh-rsa\x00\x00\x00\x85aes128-ctr,aes128-'
            b'cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,cast128-ctr,c'
            b'ast128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc\x00'
            b'\x00\x00\x85aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes25'
            b'6-ctr,aes256-cbc,cast128-ctr,cast128-cbc,blowfish-ctr,blowfis'
            b'h-cbc,3des-ctr,3des-cbc\x00\x00\x00\x12hmac-md5,hmac-sha1\x00'
            b'\x00\x00\x12hmac-md5,hmac-sha1\x00\x00\x00\tzlib,none\x00\x00'
            b'\x00\tzlib,none\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
            b'\x00\x00\x99\x99\x99\x99')
        # Even if client prefer diffie-hellman-group1-sha1, we will go for
        # diffie-hellman-group-exchange-sha256 as this what we prefer and is
        # also supported by the server.
        self.assertEqual(self.proto.kexAlg,
                         b'diffie-hellman-group-exchange-sha256')
        self.assertEqual(self.proto.keyAlg,
                         b'ssh-rsa')
        self.assertEqual(self.proto.outgoingCompressionType,
                         b'none')
        self.assertEqual(self.proto.incomingCompressionType,
                         b'none')
        ne = self.proto.nextEncryptions
        self.assertEqual(ne.outCipType, b'aes256-ctr')
        self.assertEqual(ne.inCipType, b'aes256-ctr')
        self.assertEqual(ne.outMACType, b'hmac-sha1')
        self.assertEqual(ne.inMACType, b'hmac-sha1')

        Receiving a KEXINIT packet listing multiple supported
        algorithms will set up the first common algorithm, ordered after our
        preference.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py