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:
12
Back-End/Auth/tests.py
Normal file
12
Back-End/Auth/tests.py
Normal file
@ -0,0 +1,12 @@
|
||||
from django.test import TestCase
|
||||
from .models import Profile
|
||||
|
||||
class ProfileModelTest(TestCase):
|
||||
def test_create_profile(self):
|
||||
user = Profile.objects.create_user(
|
||||
username="testuser",
|
||||
email="test@example.com",
|
||||
password="testpass123"
|
||||
)
|
||||
self.assertEqual(user.email, "test@example.com")
|
||||
self.assertTrue(user.check_password("testpass123"))
|
||||
Reference in New Issue
Block a user