def test_unsupported_publickey(self):
        """
        Private key authentication fails when the public key type is
        unsupported or the public key is corrupt.
        """
        blob = keys.Key.fromString(keydata.publicDSA_openssh).blob()

        # Change the blob to a bad type
        blob = NS(b'ssh-bad-type') + blob[11:]

        packet = (NS(b'foo') + NS(b'none') + NS(b'publickey') + b'\x00'
                  + NS(b'ssh-rsa') + NS(blob))
        d = self.authServer.ssh_USERAUTH_REQUEST(packet)

        return d.addCallback(self._checkFailed)

        Private key authentication fails when the public key type is
        unsupported or the public key is corrupt.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_userauth.py