This commit is contained in:
Ludovic Stephan 2020-06-13 19:48:27 +02:00
parent b1e079da74
commit 1d1a2bee39

View file

@ -115,7 +115,8 @@ class TestCASBackend(TestCase):
class TestOldCASBackend(TestCase): class TestOldCASBackend(TestCase):
def test_simple_auth(self): def test_simple_auth(self):
user = UserModel.objects.create_user(username="johndoe31", password="password") user = UserModel.objects.create_user(username="johndoe31", password="password")
wrong_user = UserModel.objects.create_user("johndoe", "password") # Decoy user that may be authenticated by mistake
UserModel.objects.create_user(username="johndoe", password="password")
OldCASAccount.objects.create(user=user, cas_login="johndoe", entrance_year=2019) OldCASAccount.objects.create(user=user, cas_login="johndoe", entrance_year=2019)
auth_user = authenticate( auth_user = authenticate(