diff --git a/api/tests/views/test_gebruiker.py b/api/tests/views/test_gebruiker.py index 91102502..c21c6dc1 100644 --- a/api/tests/views/test_gebruiker.py +++ b/api/tests/views/test_gebruiker.py @@ -9,7 +9,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create() self.url = reverse("gebruiker_list") self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) def test_gebruiker_list_get(self): response = self.client.get(self.url) @@ -22,7 +22,7 @@ def setUp(self): self.gebruiker.user.is_superuser = True self.gebruiker.user.save() self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("gebruiker_detail", kwargs={"id": self.gebruiker.user.id}) def test_gebruiker_detail_get(self): diff --git a/api/tests/views/test_groep.py b/api/tests/views/test_groep.py index 3d9ad45e..22c02cb0 100644 --- a/api/tests/views/test_groep.py +++ b/api/tests/views/test_groep.py @@ -10,7 +10,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.url = reverse("groep_list") self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) def test_groep_list_get(self): response = self.client.get(self.url) @@ -33,7 +33,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.url = reverse("groep_detail", kwargs={"id": self.groep.groep_id}) self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) def test_groep_detail_get(self): response = self.client.get(self.url) diff --git a/api/tests/views/test_indiening.py b/api/tests/views/test_indiening.py index cd2116ff..a1be7c6d 100644 --- a/api/tests/views/test_indiening.py +++ b/api/tests/views/test_indiening.py @@ -14,7 +14,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create() self.gebruiker.user.is_superuser = True self.gebruiker.user.save() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("indiening_list") def test_indiening_list_get(self): @@ -42,7 +42,7 @@ def setUp(self): self.gebruiker.user.is_superuser = True self.gebruiker.user.save() self.indiening = IndieningFactory.create() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse( "indiening_detail", kwargs={"id": self.indiening.indiening_id} ) @@ -63,7 +63,7 @@ def setUp(self): self.gebruiker.user.is_superuser = True self.gebruiker.user.save() self.indiening_bestand = IndieningBestandFactory.create() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("indiening_bestand_list") def test_indiening_bestand_list_get(self): diff --git a/api/tests/views/test_project.py b/api/tests/views/test_project.py index fef30bf6..7b3a1301 100644 --- a/api/tests/views/test_project.py +++ b/api/tests/views/test_project.py @@ -13,7 +13,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.url = reverse("project_list") self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) def test_project_list_get(self): response = self.client.get(self.url) @@ -39,7 +39,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.url = reverse("project_detail", kwargs={"id": self.project.project_id}) self.client = APIClient() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) def test_project_detail_get(self): response = self.client.get(self.url) diff --git a/api/tests/views/test_score.py b/api/tests/views/test_score.py index ab4e20de..8508d7c6 100644 --- a/api/tests/views/test_score.py +++ b/api/tests/views/test_score.py @@ -15,7 +15,7 @@ def setUp(self): self.score = ScoreFactory.create() self.score.score = self.score.indiening.groep.project.max_score self.score.save() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("score_list") def test_score_list_get(self): @@ -40,7 +40,7 @@ def setUp(self): self.gebruiker.user.is_superuser = True self.gebruiker.user.save() self.score = ScoreFactory.create() - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("score_detail", kwargs={"id": self.score.score_id}) def test_score_detail_get(self): diff --git a/api/tests/views/test_vak.py b/api/tests/views/test_vak.py index 19c07230..4933b839 100644 --- a/api/tests/views/test_vak.py +++ b/api/tests/views/test_vak.py @@ -12,7 +12,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.studenten = GebruikerFactory.create_batch(3, is_lesgever=False) self.lesgevers = GebruikerFactory.create_batch(2, is_lesgever=True) - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("vak_list") def test_vak_list_get(self): @@ -36,7 +36,7 @@ def setUp(self): self.gebruiker = GebruikerFactory.create(is_lesgever=True) self.studenten = GebruikerFactory.create_batch(3, is_lesgever=False) self.lesgevers = GebruikerFactory.create_batch(2, is_lesgever=True) - self.client.force_authenticate(user=self.gebruiker.user) + self.client.force_login(self.gebruiker.user) self.url = reverse("vak_detail", args=[self.vak.vak_id]) def test_vak_detail_get(self):