test updates to take into account exception management

This commit is contained in:
2025-09-27 13:47:36 +02:00
parent 3e720212d9
commit 6b9817f179
38 changed files with 2951 additions and 871 deletions

View File

@@ -163,25 +163,25 @@ class TestAuthService:
def test_email_exists_true(self, db, test_user):
"""Test email_exists returns True when email exists"""
exists = self.service.email_exists(db, test_user.email)
exists = self.service._email_exists(db, test_user.email)
assert exists is True
def test_email_exists_false(self, db):
"""Test email_exists returns False when email doesn't exist"""
exists = self.service.email_exists(db, "nonexistent@example.com")
exists = self.service._email_exists(db, "nonexistent@example.com")
assert exists is False
def test_username_exists_true(self, db, test_user):
"""Test username_exists returns True when username exists"""
exists = self.service.username_exists(db, test_user.username)
exists = self.service._username_exists(db, test_user.username)
assert exists is True
def test_username_exists_false(self, db):
"""Test username_exists returns False when username doesn't exist"""
exists = self.service.username_exists(db, "nonexistentuser")
exists = self.service._username_exists(db, "nonexistentuser")
assert exists is False