def METHOD_NAME(
    self,
    method,
    tpa_hint,
    next_url,
    expected_url,
    running_pipeline,
    mock_running_pipeline,
):
    mock_running_pipeline.return_value = running_pipeline
    def validate_login():
        """
        Assert that get_next_url_for_login_page returns as expected.
        """
        if method == 'GET':
            req = self.request.get(settings.LOGIN_URL + f"?next={next_url}")
        elif method == 'POST':
            req = self.request.post(settings.LOGIN_URL, {'next': next_url})
        req.META["HTTP_ACCEPT"] = "text/html"
        self._add_session(req)
        next_page = get_next_url_for_login_page(req)
        assert next_page == expected_url
    with override_settings(FEATURES=dict(settings.FEATURES, THIRD_PARTY_AUTH_HINT=tpa_hint)):
        validate_login()
    with with_site_configuration_context(configuration=dict(THIRD_PARTY_AUTH_HINT=tpa_hint)):
        validate_login()