def test_checkBad_KEX_INIT_CurveName(self):
        """
        Test that if the server received a bad name for a curve
        we raise an UnsupportedAlgorithm error.
        """
        kexmsg = (
            b"\xAA" * 16 +
            common.NS(b'ecdh-sha2-nistp256') +
            common.NS(b'ssh-rsa') +
            common.NS(b'aes256-ctr') +
            common.NS(b'aes256-ctr') +
            common.NS(b'hmac-sha1') +
            common.NS(b'hmac-sha1') +
            common.NS(b'none') +
            common.NS(b'none') +
            common.NS(b'') +
            common.NS(b'') +
            b'\x00' + b'\x00\x00\x00\x00')

        self.proto.ssh_KEXINIT(kexmsg)
        self.assertRaises(AttributeError)
        self.assertRaises(UnsupportedAlgorithm)

        Test that if the server received a bad name for a curve
        we raise an UnsupportedAlgorithm error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py