test updates to take into account exception management
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user