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

13 lines
408 B
Python

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"))