Commit abf0200f authored by Valentin Samir's avatar Valentin Samir

Add a test case related to 6b3b280d

parent 17228bae
......@@ -151,7 +151,14 @@ class FederateAuthLoginLogoutTestCase(
def test_login_twice(self):
"""Test that user id db is used for the second login (cf coverage)"""
self.test_login_post_provider()
self.test_login_post_provider()
tickets = self.test_login_post_provider()
# trying to authenticated while being already authenticated should redirect to /login
for (provider, _, client) in tickets:
response = client.get("/federate/%s" % provider.suffix)
self.assertEqual(response.status_code, 302)
self.assertEqual(response["Location"], "%s/login" % (
'http://testserver' if django.VERSION < (1, 9) else ""
))
@override_settings(CAS_FEDERATE=False)
def test_auth_federate_false(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment