def test_sso_logout_url(request_logged_in, settings): settings.SSO_PROXY_LOGOUT_URL = 'http://www.example.com/logout/' context = context_processors.sso_processor(request_logged_in) assert context['sso_logout_url'] == ( 'http://www.example.com/logout/?next=http://testserver/')
def test_sso_user(request_logged_in, sso_user): context = context_processors.sso_processor(request_logged_in) assert context['sso_user'] == sso_user
def test_sso_login_url(request_logged_in, settings): settings.SSO_PROXY_LOGIN_URL = 'http://www.example.com/login/' expected = 'http://www.example.com/login/?next=http://testserver/' context = context_processors.sso_processor(request_logged_in) assert context['sso_login_url'] == expected
def test_sso_logged_out(request_logged_out): context = context_processors.sso_processor(request_logged_out) assert context['sso_is_logged_in'] is False
def test_sso_register_url_url(request_logged_in, settings): settings.SSO_PROXY_SIGNUP_URL = 'http://www.example.com/signup/' context = context_processors.sso_processor(request_logged_in) assert context['sso_register_url'] == ( 'http://www.example.com/signup/?next=http://testserver/')
def test_sso_profile_url(request_logged_in, settings): settings.SSO_PROFILE_URL = 'http://www.example.com/profile/' context = context_processors.sso_processor(request_logged_in) assert context['sso_profile_url'] == settings.SSO_PROFILE_URL
def test_sso_logged_in(request_logged_in): context = context_processors.sso_processor(request_logged_in) assert context['sso_is_logged_in'] is True