Files
n3wt-school/Back-End/Common/tests.py
2025-06-05 16:42:50 +02:00

12 lines
364 B
Python

from django.test import TestCase
from .models import Domain
# Create your tests here.
class DomainModelTest(TestCase):
def test_create_domain(self):
domain = Domain.objects.create(name="Mathématiques", cycle=1)
self.assertEqual(domain.name, "Mathématiques")
self.assertEqual(domain.cycle, 1)
self.assertIsNotNone(domain.id)