Add simple unit tests

This commit is contained in:
zandercymatics 2024-08-14 10:16:50 -06:00
parent fdc5236968
commit a847b07ef7
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 90 additions and 4 deletions

View file

@ -122,8 +122,9 @@ class Portfolio(TimeStampedModel):
@property
def portfolio_type(self):
"""Returns a combination of organization_type and federal_type,
seperated by ' - '. If no federal_type is found, we just return the org type."""
"""
Returns a combination of organization_type / federal_type, seperated by ' - '.
If no federal_type is found, we just return the org type."""
org_type = self.OrganizationChoices.get_org_label(self.organization_type)
if self.organization_type == self.OrganizationChoices.FEDERAL and self.federal_type:
return " - ".join([org_type, self.federal_type])