mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Création de tests unitaires pour le back[#63]
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user