Add Unit tests

This commit is contained in:
zandercymatics 2024-12-13 12:29:08 -07:00
parent 24480ec434
commit c551a60e3a
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 174 additions and 6 deletions

View file

@ -8,6 +8,7 @@ import logging
logger = logging.getLogger(__name__)
class UserPortfolioRoleChoices(models.TextChoices):
"""
Roles make it easier for admins to look at
@ -23,7 +24,7 @@ class UserPortfolioRoleChoices(models.TextChoices):
except ValueError:
logger.warning(f"Invalid portfolio role: {user_portfolio_role}")
return f"Unknown ({user_portfolio_role})"
@classmethod
def get_role_description(cls, user_portfolio_role):
"""Returns a detailed description for a given role."""
@ -37,7 +38,7 @@ class UserPortfolioRoleChoices(models.TextChoices):
"organization domain requests and submit domain requests on behalf of the organization. Basic access "
"members cant view all members of an organization or manage them. "
"Domain management can be assigned separately."
)
),
}
return descriptions.get(user_portfolio_role)