def test_logout_url_helper_with_redirect(settings):
    settings.CAS_SERVER_URL = 'http://www.example.com/cas/'

    factory = RequestFactory()
    request = factory.get('/logout/')

    actual = _logout_url(request, next_page='/landing-page/')
    expected = 'http://www.example.com/cas/logout?url=http%3A%2F%2Ftestserver%2Flanding-page%2F'

    assert actual == expected
예제 #2
0
def test_logout_url_helper_with_redirect(settings):
    settings.CAS_SERVER_URL = 'http://www.example.com/cas/'

    factory = RequestFactory()
    request = factory.get('/logout/')

    actual = _logout_url(request, next_page='/landing-page/')
    expected = 'http://www.example.com/cas/logout?url=http%3A%2F%2Ftestserver%2Flanding-page%2F'

    assert actual == expected
def test_logout_url_helper(settings):
    settings.CAS_SERVER_URL = 'http://www.example.com/cas/'

    factory = RequestFactory()
    request = factory.get('/logout/')

    actual = _logout_url(request)
    expected = 'http://www.example.com/cas/logout'

    assert actual == expected
예제 #4
0
def test_logout_url_helper(settings):
    settings.CAS_SERVER_URL = 'http://www.example.com/cas/'

    factory = RequestFactory()
    request = factory.get('/logout/')

    actual = _logout_url(request)
    expected = 'http://www.example.com/cas/logout'

    assert actual == expected