Test the login switch view
This commit is contained in:
parent
68e43f488a
commit
9f2e2a235a
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,7 @@ from authens.tests.cas_utils import FakeCASClient
|
|||
UserModel = get_user_model()
|
||||
|
||||
|
||||
class TestCASLoginView(TestCase):
|
||||
class TestLoginViews(TestCase):
|
||||
def test_cas_login_redirect(self):
|
||||
url = reverse("authens:login.cas")
|
||||
abs_url = "http://testserver{}".format(url)
|
||||
|
@ -40,6 +40,10 @@ class TestCASLoginView(TestCase):
|
|||
response = client.get("{}?ticket=dummy-ticket".format(url), follow=True)
|
||||
self.assertRedirects(response, settings.LOGIN_REDIRECT_URL)
|
||||
|
||||
def test_can_gen_login_switch(self):
|
||||
response = Client().get(reverse("authens:login"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
class TestLogoutView(TestCase):
|
||||
def test_regular_logout(self):
|
||||
|
|
Loading…
Reference in a new issue