Fix participation detail test (a tournament is required)

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-02-11 23:38:32 +01:00
parent 850659bf48
commit 2e574d0659
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 0 deletions

View File

@ -438,6 +438,7 @@ class TestStudentParticipation(TestCase):
self.user.registration.save() self.user.registration.save()
# Team is valid # Team is valid
self.team.participation.tournament = self.tournament
self.team.participation.valid = True self.team.participation.valid = True
self.team.participation.save() self.team.participation.save()
response = self.client.post(reverse("participation:team_leave")) response = self.client.post(reverse("participation:team_leave"))
@ -479,6 +480,7 @@ class TestStudentParticipation(TestCase):
reverse("participation:participation_detail", args=(self.team.participation.pk,)), reverse("participation:participation_detail", args=(self.team.participation.pk,)),
302, 403) 302, 403)
self.team.participation.tournament = self.tournament
self.team.participation.valid = True self.team.participation.valid = True
self.team.participation.save() self.team.participation.save()
response = self.client.get(reverse("participation:my_participation_detail")) response = self.client.get(reverse("participation:my_participation_detail"))