def test_failedPrivateKeyAuthenticationWithoutSignature(self):
        """
        Test that private key authentication fails when the public key
        is invalid.
        """
        blob = keys.Key.fromString(keydata.publicDSA_openssh).blob()
        packet = (NS(b'foo') + NS(b'none') + NS(b'publickey') + b'\x00'
                + NS(b'ssh-dsa') + NS(blob))
        d = self.authServer.ssh_USERAUTH_REQUEST(packet)
        return d.addCallback(self._checkFailed)

        Test that private key authentication fails when the public key
        is invalid.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_userauth.py