mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
28 lines
954 B
Python
28 lines
954 B
Python
from django.test import TestCase
|
|
from .models import Planning
|
|
from Establishment.models import Establishment
|
|
from School.models import SchoolClass
|
|
|
|
class PlanningModelTest(TestCase):
|
|
def setUp(self):
|
|
self.establishment = Establishment.objects.create(
|
|
name="École Test",
|
|
address="1 rue de l'École",
|
|
total_capacity=100,
|
|
establishment_type=[1],
|
|
evaluation_frequency=1,
|
|
licence_code="ABC123"
|
|
)
|
|
self.school_class = SchoolClass.objects.create(
|
|
atmosphere_name="Classe Test",
|
|
establishment=self.establishment
|
|
)
|
|
|
|
def test_create_planning(self):
|
|
planning = Planning.objects.create(
|
|
school_class=self.school_class,
|
|
establishment=self.establishment
|
|
)
|
|
self.assertEqual(planning.school_class, self.school_class)
|
|
self.assertEqual(planning.establishment, self.establishment)
|