mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
18 lines
708 B
Python
18 lines
708 B
Python
from django.test import TestCase
|
|
from .models import Establishment, StructureType, EvaluationFrequency
|
|
|
|
class EstablishmentModelTest(TestCase):
|
|
def test_create_establishment(self):
|
|
est = Establishment.objects.create(
|
|
name="École Test",
|
|
address="1 rue de l'École",
|
|
total_capacity=100,
|
|
establishment_type=[StructureType.PRIMAIRE],
|
|
evaluation_frequency=EvaluationFrequency.TRIMESTER,
|
|
licence_code="ABC123"
|
|
)
|
|
self.assertEqual(est.name, "École Test")
|
|
self.assertEqual(est.establishment_type, [StructureType.PRIMAIRE])
|
|
self.assertTrue(est.is_active)
|
|
self.assertIsNotNone(est.created_at)
|