1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-09 12:50:20 +02:00

Fix video table

This commit is contained in:
Yohann D'ANELLO
2020-11-03 15:33:25 +01:00
parent aed9f457c3
commit 52763cb75a
2 changed files with 15 additions and 6 deletions

View File

@ -4,7 +4,7 @@ from django.contrib.sites.models import Site
from django.core.management import call_command
from django.test import TestCase
from django.urls import reverse
from registration.models import StudentRegistration
from registration.models import CoachRegistration, StudentRegistration
from .models import Participation, Question, Team
@ -60,6 +60,14 @@ class TestStudentParticipation(TestCase):
grant_animath_access_videos=True,
)
self.coach = User.objects.create(
first_name="Coach",
last_name="Coach",
email="coach@example.com",
password="coach",
)
CoachRegistration.objects.create(user=self.coach)
def test_admin_pages(self):
"""
Load Django-admin pages.
@ -356,6 +364,9 @@ class TestStudentParticipation(TestCase):
self.user.registration.team = self.team
self.user.registration.save()
self.coach.registration.team = self.team
self.coach.registration.save()
response = self.client.get(reverse("participation:update_team", args=(self.team.pk,)))
self.assertEqual(response.status_code, 200)