tweak tests and linter

This commit is contained in:
Rachid Mrad 2023-10-31 11:14:18 -04:00
parent 8e768112f3
commit 1cb0127dfb
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
2 changed files with 5 additions and 3 deletions

View file

@ -39,6 +39,7 @@ class ExportDataTest(TestCase):
domain=self.domain_1,
organization_type="federal",
federal_agency="World War I Centennial Commission",
federal_type="executive",
)
self.domain_information_2, _ = DomainInformation.objects.get_or_create(
creator=self.user,
@ -114,7 +115,7 @@ class ExportDataTest(TestCase):
"AO email,Submitter,Submitter title,Submitter email,Submitter phone,"
"Security Contact Email,Status\n"
"adomain2.gov,Interstate,dnsneeded\n"
"cdomain1.gov,Federal,World War I Centennial Commission,ready\n"
"cdomain1.gov,Federal - Executive,World War I Centennial Commission,ready\n"
"ddomain3.gov,Federal,Armed Forces Retirement Home,onhold\n"
)
@ -174,7 +175,7 @@ class ExportDataTest(TestCase):
expected_content = (
"Domain name,Domain type,Federal agency,Organization name,City,"
"State,Security Contact Email\n"
"cdomain1.gov,Federal,World War I Centennial Commission\n"
"cdomain1.gov,Federal - Executive,World War I Centennial Commission\n"
"ddomain3.gov,Federal,Armed Forces Retirement Home\n"
)

View file

@ -20,7 +20,8 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition):
FIELDS = {
"Domain name": domainInfo.domain.name,
"Domain type": domainInfo.get_organization_type_display()
+ " - " + domainInfo.federal_type
+ " - "
+ domainInfo.get_federal_type_display()
if domainInfo.federal_type
else domainInfo.get_organization_type_display(),
"Federal agency": domainInfo.federal_agency,