mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Création de tests unitaires pour le back[#63]
This commit is contained in:
13
Back-End/GestionMessagerie/tests.py
Normal file
13
Back-End/GestionMessagerie/tests.py
Normal file
@ -0,0 +1,13 @@
|
||||
from django.test import TestCase
|
||||
from .models import Conversation
|
||||
|
||||
class ConversationModelTest(TestCase):
|
||||
def test_create_conversation(self):
|
||||
conv = Conversation.objects.create(
|
||||
name="Groupe Test",
|
||||
conversation_type="group"
|
||||
)
|
||||
self.assertEqual(conv.name, "Groupe Test")
|
||||
self.assertEqual(conv.conversation_type, "group")
|
||||
self.assertTrue(conv.is_active)
|
||||
self.assertIsNotNone(conv.id)
|
||||
Reference in New Issue
Block a user