Tests: instantiate FakeCASClient with no argument

This commit is contained in:
Martin Pépin 2020-06-12 12:17:28 +02:00
parent 9f2e2a235a
commit d2d7622a34
No known key found for this signature in database
GPG key ID: E7520278B1774448

View file

@ -31,7 +31,7 @@ class TestLoginViews(TestCase):
def test_cas_login_with_ticket(self, mock_cas_client):
# Make `get_cas_client` return a dummy CAS client that skips ticket verification
# and always log in a user with CAS login 'johndoe'.
mock_cas_client.return_value = FakeCASClient("johndoe", 2019)
mock_cas_client.return_value = FakeCASClient()
url = reverse("authens:login.cas")
client = Client()
@ -64,7 +64,7 @@ class TestLogoutView(TestCase):
# Make `get_cas_client` return a dummy CAS client that skips ticket verification
# and always log in a user with CAS login 'johndoe'.
# This is only used for login.
mock_cas_client.return_value = FakeCASClient("johndoe", 2019)
mock_cas_client.return_value = FakeCASClient()
# CAS user
user = UserModel.objects.create_user(username="johndoe")