1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05:42:23 +00:00

Fix tests, upload a fake motivation letter

This commit is contained in:
Yohann D'ANELLO 2021-01-22 09:48:11 +01:00
parent 1d25f7f824
commit c06ae694cd
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -288,6 +288,12 @@ class TestStudentParticipation(TestCase):
self.user.registration.parental_authorization = "authorization/parental/ananas"
self.user.registration.save()
resp = self.client.get(reverse("participation:team_detail", args=(self.team.pk,)))
self.assertEqual(resp.status_code, 200)
self.assertFalse(resp.context["can_validate"])
self.team.motivation_letter = "i_am_motivated.pdf"
self.team.save()
resp = self.client.get(reverse("participation:team_detail", args=(self.team.pk,)))
self.assertEqual(resp.status_code, 200)
self.assertTrue(resp.context["can_validate"])