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

Fix tests

This commit is contained in:
Yohann D'ANELLO
2021-01-18 22:28:43 +01:00
parent d05a8339fe
commit ef4d74545a
7 changed files with 164 additions and 128 deletions

View File

@ -9,7 +9,7 @@ from django.test import TestCase
from django.urls import reverse
from registration.models import CoachRegistration, StudentRegistration
from .models import Participation, Team
from .models import Participation, Team, Tournament
class TestStudentParticipation(TestCase):
@ -67,6 +67,11 @@ class TestStudentParticipation(TestCase):
)
CoachRegistration.objects.create(user=self.coach)
self.tournament = Tournament.objects.create(
name="France",
place="Here",
)
def test_admin_pages(self):
"""
Load Django-admin pages.
@ -347,6 +352,7 @@ class TestStudentParticipation(TestCase):
))
self.assertEqual(resp.status_code, 200)
self.team.participation.tournament = self.tournament
self.team.participation.valid = False
self.team.participation.save()