fix(user): remove email from accounts
All checks were successful
State Corp Backend CI/CD / Quality gate (push) Successful in 2m45s
State Corp Backend CI/CD / Build linux/amd64 images once (push) Successful in 4m32s
State Corp Backend CI/CD / Release dev (push) Has been skipped
State Corp Backend CI/CD / Refresh and release internal main (push) Has been skipped
State Corp Backend CI/CD / Release customer main (push) Has been skipped

This commit is contained in:
Aleksandr Meshchryakov
2026-10-01 10:20:01 +02:00
parent 7484b3c2b6
commit 2bfbb133bc
24 changed files with 248 additions and 307 deletions

View File

@@ -17,12 +17,11 @@ class UserModelTest(TestCase):
def test_user_creation(self):
"""Test user creation"""
self.assertTrue(self.user.email)
self.assertTrue(self.user.username)
def test_user_str_representation(self):
"""Test user string representation"""
expected = f"{self.user.username} ({self.user.email})"
expected = self.user.username
self.assertEqual(str(self.user), expected)
def test_superuser_creation(self):
@@ -30,10 +29,6 @@ class UserModelTest(TestCase):
self.assertTrue(self.superuser.is_staff)
self.assertTrue(self.superuser.is_superuser)
def test_user_email_unique(self):
"""Test email field is unique"""
self.assertTrue(self.user._meta.get_field("email").unique)
def test_user_username_required(self):
"""Test username is required field"""
self.assertFalse(self.user._meta.get_field("username").blank)