mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 01:26:54 +00:00
Set team valid in tests
This commit is contained in:
parent
427786769f
commit
fe29c61003
@ -130,6 +130,13 @@ class TestStudentParticipation(TestCase):
|
||||
self.user.registration.team = self.team
|
||||
self.user.registration.save()
|
||||
|
||||
response = self.client.get(reverse("participation:my_participation_detail"))
|
||||
self.assertRedirects(response,
|
||||
reverse("participation:participation_detail", args=(self.team.participation.pk,)),
|
||||
302, 403)
|
||||
|
||||
self.team.participation.valid = True
|
||||
self.team.participation.save()
|
||||
response = self.client.get(reverse("participation:my_participation_detail"))
|
||||
self.assertRedirects(response,
|
||||
reverse("participation:participation_detail", args=(self.team.participation.pk,)),
|
||||
@ -142,6 +149,9 @@ class TestStudentParticipation(TestCase):
|
||||
self.user.registration.team = self.team
|
||||
self.user.registration.save()
|
||||
|
||||
self.team.participation.valid = True
|
||||
self.team.participation.save()
|
||||
|
||||
response = self.client.get(reverse("participation:upload_video", args=(self.team.participation.solution.pk,)))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user