Skip to content

Commit

Permalink
Merge pull request #69 from SELab-2/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sPAICEcake authored Mar 14, 2024
2 parents b4ea76e + 19c6157 commit 9ef7942
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions api/tests/views/test_gebruiker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions api/tests/views/test_groep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions api/tests/views/test_indiening.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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}
)
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions api/tests/views/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions api/tests/views/test_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions api/tests/views/test_vak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 9ef7942

Please sign in to comment.