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

@@ -170,16 +170,6 @@ class AuthService:
"""Check if username already exists."""
return db.query(User).filter(User.username == username).first() is not None
# Legacy methods for backward compatibility (deprecated)
def email_exists(self, db: Session, email: str) -> bool:
"""Check if email already exists. DEPRECATED: Use proper exception handling."""
logger.warning("email_exists is deprecated, use proper exception handling")
return self._email_exists(db, email)
def username_exists(self, db: Session, username: str) -> bool:
"""Check if username already exists. DEPRECATED: Use proper exception handling."""
logger.warning("username_exists is deprecated, use proper exception handling")
return self._username_exists(db, username)
# Create service instance following the same pattern as other services