On rajoute un test pour l'auth OldCAS avec un compte CAS non migré
This commit is contained in:
parent
d9490ba34a
commit
4dbd0a1a80
1 changed files with 9 additions and 0 deletions
|
@ -123,3 +123,12 @@ class TestOldCASBackend(TestCase):
|
||||||
None, cas_login="johndoe", entrance_year=2014, password="password"
|
None, cas_login="johndoe", entrance_year=2014, password="password"
|
||||||
)
|
)
|
||||||
self.assertEqual(auth_user, user)
|
self.assertEqual(auth_user, user)
|
||||||
|
|
||||||
|
def test_not_migrated_auth(self):
|
||||||
|
user = UserModel.objects.create_user(username="vieilleux", password="password")
|
||||||
|
CASAccount.objects.create(user=user, cas_login="vieilleux", entrance_year=2015)
|
||||||
|
|
||||||
|
auth_user = authenticate(
|
||||||
|
None, cas_login="vieilleux", entrance_year=2015, password="password"
|
||||||
|
)
|
||||||
|
self.assertEqual(auth_user, user)
|
||||||
|
|
Loading…
Reference in a new issue