fixed some casing and associated tests

This commit is contained in:
David Kennedy 2024-08-26 20:43:06 -04:00
parent 6f4c63c995
commit 88086a07d8
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 5 additions and 5 deletions

View file

@ -3016,10 +3016,10 @@ class PortfolioAdmin(ListHeaderAdmin):
if domain_count > 0: if domain_count > 0:
# Construct the URL to the admin page, filtered by portfolio # Construct the URL to the admin page, filtered by portfolio
url = reverse("admin:registrar_domain_changelist") + f"?portfolio={obj.id}" url = reverse("admin:registrar_domain_changelist") + f"?portfolio={obj.id}"
label = "Domain" if domain_count == 1 else "No domains" label = "domain" if domain_count == 1 else "domains"
# Create a clickable link with the domain count # Create a clickable link with the domain count
return format_html('<a href="{}">{} {}</a>', url, domain_count, label) return format_html('<a href="{}">{} {}</a>', url, domain_count, label)
return "No Domains" return "No domains"
domains.short_description = "Domains" # type: ignore domains.short_description = "Domains" # type: ignore
@ -3030,7 +3030,7 @@ class PortfolioAdmin(ListHeaderAdmin):
# Construct the URL to the admin page, filtered by portfolio # Construct the URL to the admin page, filtered by portfolio
url = reverse("admin:registrar_domainrequest_changelist") + f"?portfolio={obj.id}" url = reverse("admin:registrar_domainrequest_changelist") + f"?portfolio={obj.id}"
# Create a clickable link with the domain request count # Create a clickable link with the domain request count
return format_html('<a href="{}">{} Domain Requests</a>', url, domain_request_count) return format_html('<a href="{}">{} domain requests</a>', url, domain_request_count)
return "No domain requests" return "No domain requests"
domain_requests.short_description = "Domain requests" # type: ignore domain_requests.short_description = "Domain requests" # type: ignore

View file

@ -2107,7 +2107,7 @@ class TestPortfolioAdmin(TestCase):
domain_2.save() domain_2.save()
domains = self.admin.domains(self.portfolio) domains = self.admin.domains(self.portfolio)
self.assertIn("2 Domains", domains) self.assertIn("2 domains", domains)
@less_console_noise_decorator @less_console_noise_decorator
def test_domain_requests_display(self): def test_domain_requests_display(self):
@ -2116,4 +2116,4 @@ class TestPortfolioAdmin(TestCase):
completed_domain_request(name="request2.gov", portfolio=self.portfolio) completed_domain_request(name="request2.gov", portfolio=self.portfolio)
domain_requests = self.admin.domain_requests(self.portfolio) domain_requests = self.admin.domain_requests(self.portfolio)
self.assertIn("2 Domain Requests", domain_requests) self.assertIn("2 domain requests", domain_requests)