Fix tests

This commit is contained in:
Ludovic Stephan 2021-06-15 16:52:56 +02:00
parent a34b83c236
commit 6a11139588
7 changed files with 28 additions and 13 deletions

View file

@ -77,7 +77,9 @@ class PetitCoursInscriptionViewTestCase(ViewTestCaseMixin, TestCase):
self.subject2 = create_petitcours_subject(name="Matière 2")
def test_get_forbidden_user_not_cof(self):
self.client.force_login(self.users["user"])
self.client.force_login(
self.users["user"], backend="django.contrib.auth.backends.ModelBackend"
)
resp = self.client.get(self.url)
self.assertRedirects(resp, reverse("cof-denied"))