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:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user