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
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:
@@ -20,7 +20,6 @@ class BaseServiceTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create_user(
|
||||
username="testuser",
|
||||
email="test@example.com",
|
||||
password="testpass123", # noqa: S106
|
||||
)
|
||||
|
||||
@@ -28,7 +27,6 @@ class BaseServiceTest(TestCase):
|
||||
"""Test get_by_id returns entity"""
|
||||
result = UserTestService.get_by_id(self.user.pk)
|
||||
self.assertEqual(result.pk, self.user.pk)
|
||||
self.assertEqual(result.email, self.user.email)
|
||||
|
||||
def test_get_by_id_not_found(self):
|
||||
"""Test get_by_id raises NotFoundError for non-existent ID"""
|
||||
@@ -52,7 +50,6 @@ class BaseServiceTest(TestCase):
|
||||
"""Test get_all returns queryset"""
|
||||
User.objects.create_user(
|
||||
username="testuser2",
|
||||
email="test2@example.com",
|
||||
password="testpass123", # noqa: S106
|
||||
)
|
||||
|
||||
@@ -61,18 +58,17 @@ class BaseServiceTest(TestCase):
|
||||
|
||||
def test_filter(self):
|
||||
"""Test filter returns filtered queryset"""
|
||||
result = UserTestService.filter(email="test@example.com")
|
||||
result = UserTestService.filter(username="testuser")
|
||||
self.assertEqual(result.count(), 1)
|
||||
self.assertEqual(result.first().email, "test@example.com")
|
||||
|
||||
def test_exists_true(self):
|
||||
"""Test exists returns True when entity exists"""
|
||||
result = UserTestService.exists(email="test@example.com")
|
||||
result = UserTestService.exists(username="testuser")
|
||||
self.assertTrue(result)
|
||||
|
||||
def test_exists_false(self):
|
||||
"""Test exists returns False when entity does not exist"""
|
||||
result = UserTestService.exists(email="nonexistent@example.com")
|
||||
result = UserTestService.exists(username="nonexistent")
|
||||
self.assertFalse(result)
|
||||
|
||||
def test_count_all(self):
|
||||
@@ -82,10 +78,10 @@ class BaseServiceTest(TestCase):
|
||||
|
||||
def test_count_filtered(self):
|
||||
"""Test count with filter"""
|
||||
result = UserTestService.count(email="test@example.com")
|
||||
result = UserTestService.count(username="testuser")
|
||||
self.assertEqual(result, 1)
|
||||
|
||||
result = UserTestService.count(email="nonexistent@example.com")
|
||||
result = UserTestService.count(username="nonexistent")
|
||||
self.assertEqual(result, 0)
|
||||
|
||||
def test_update(self):
|
||||
|
||||
Reference in New Issue
Block a user