def METHOD_NAME(self, log_level, log_name, unsafe_url, http_accept, user_agent, expected_log):
    """ Test unsafe next parameter """
    with LogCapture(LOGGER_NAME, level=log_level) as logger:
        req = self.request.get(settings.LOGIN_URL + f"?next={unsafe_url}")
        req.META["HTTP_ACCEPT"] = http_accept
        req.META["HTTP_USER_AGENT"] = user_agent
        get_next_url_for_login_page(req)
        logger.check(
            (LOGGER_NAME, log_name, expected_log)
        )