def METHOD_NAME(self, url):
    """
    Make a GET request to the given URL, and ensure that it either redirects
    to login or denies access outright.
    """
    try:
        with less_console_noise():
            response = self.client.get(url)
    except Exception as e:
        # It'll be helpful to provide information on what URL was being
        # accessed at the time the exception occurred.  Python 3 will
        # also include a full traceback of the original exception, so
        # we don't need to worry about hiding the original cause.
        raise AssertionError(f'Accessing {url} raised "{e}"', e)
    code = response.status_code
    if code == 302:
        redirect = response["location"]
        self.assertRegex(
            redirect,
            r"^\/openid\/login",
            f"GET {url} should redirect to login or deny access, but instead "
            f"it redirects to {redirect}",
        )
    elif code == 401 or code == 403:
        pass
    else:
        raise AssertionError(
            f"GET {url} returned HTTP {code}, but should redirect to login or "
            "deny access",
        )