1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-04 07:32:18 +02:00

Send validation emails to all local organizers

This commit is contained in:
Yohann D'ANELLO
2021-01-23 21:48:01 +01:00
parent ab1c5a276a
commit f53f9fbc6c
5 changed files with 53 additions and 40 deletions

View File

@ -321,8 +321,12 @@ class TestStudentParticipation(TestCase):
A team asked for validation. Try to validate it.
"""
self.team.participation.valid = False
self.team.participation.tournament = self.tournament
self.team.participation.save()
self.tournament.organizers.add(self.superuser.registration)
self.tournament.save()
# No right to do that
resp = self.client.post(reverse("participation:team_detail", args=(self.team.pk,)), data=dict(
_form_type="ValidateParticipationForm",
@ -384,6 +388,9 @@ class TestStudentParticipation(TestCase):
self.coach.registration.team = self.team
self.coach.registration.save()
self.team.participation.tournament = self.tournament
self.team.participation.save()
response = self.client.get(reverse("participation:update_team", args=(self.team.pk,)))
self.assertEqual(response.status_code, 200)