mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 09:21:54 +02:00
A few updates based on feedback
This commit is contained in:
parent
6ca53560ea
commit
a6308edffe
3 changed files with 7 additions and 11 deletions
|
@ -491,7 +491,7 @@ class TestDomainAdminWithClient(TestCase):
|
|||
self.assertContains(response, "This table contains all approved domains in the .gov registrar.")
|
||||
self.assertContains(response, "Show more")
|
||||
|
||||
# @less_console_noise_decorator
|
||||
@less_console_noise_decorator
|
||||
def test_contact_fields_on_domain_change_form_have_detail_table(self):
|
||||
"""Tests if the contact fields in the inlined Domain information have the detail table
|
||||
which displays title, email, and phone"""
|
||||
|
|
|
@ -326,7 +326,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
# spaces and leading/trailing whitespace
|
||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||
|
||||
self.maxDiff = None
|
||||
self.assertEqual(csv_content, expected_content)
|
||||
|
||||
|
@ -509,7 +508,7 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
self.maxDiff = None
|
||||
self.assertEqual(csv_content, expected_content)
|
||||
|
||||
# @less_console_noise_decorator
|
||||
@less_console_noise_decorator
|
||||
def test_domain_data_federal(self):
|
||||
"""Shows security contacts, filtered by state and org type"""
|
||||
# Add security email information
|
||||
|
@ -606,7 +605,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||
)
|
||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||
|
||||
self.assertEqual(csv_content, expected_content)
|
||||
|
||||
@less_console_noise_decorator
|
||||
|
@ -689,7 +687,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
# spaces and leading/trailing whitespace
|
||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||
|
||||
self.assertEqual(csv_content, expected_content)
|
||||
|
||||
@less_console_noise_decorator
|
||||
|
@ -727,7 +724,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
|||
# spaces and leading/trailing whitespace
|
||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||
|
||||
self.assertEqual(csv_content, expected_content)
|
||||
|
||||
@less_console_noise_decorator
|
||||
|
|
|
@ -138,7 +138,7 @@ class BaseExport(ABC):
|
|||
return Q()
|
||||
|
||||
@classmethod
|
||||
def get_computed_fields(cls, **kwargs):
|
||||
def get_computed_fields(cls, delimiter=", ", **kwargs):
|
||||
"""
|
||||
Get a dict of computed fields. These are fields that do not exist on the model normally
|
||||
and will be passed to .annotate() when building a queryset.
|
||||
|
@ -526,7 +526,7 @@ class DomainExport(BaseExport):
|
|||
return DomainInformation
|
||||
|
||||
@classmethod
|
||||
def get_computed_fields(cls, delimiter=", "):
|
||||
def get_computed_fields(cls, delimiter=", ", **kwargs):
|
||||
"""
|
||||
Get a dict of computed fields.
|
||||
"""
|
||||
|
@ -612,7 +612,7 @@ class DomainExport(BaseExport):
|
|||
"converted_so_name": Case(
|
||||
# When portfolio is present, use that senior official instead
|
||||
When(
|
||||
portfolio__isnull=False,
|
||||
Q(portfolio__isnull=False) & Q(portfolio__senior_official__isnull=False),
|
||||
then=Concat(
|
||||
Coalesce(F("portfolio__senior_official__first_name"), Value("")),
|
||||
Value(" "),
|
||||
|
@ -1615,7 +1615,7 @@ class DomainRequestExport(BaseExport):
|
|||
)
|
||||
|
||||
@classmethod
|
||||
def get_computed_fields(cls, delimiter=", "):
|
||||
def get_computed_fields(cls, delimiter=", ", **kwargs):
|
||||
"""
|
||||
Get a dict of computed fields.
|
||||
"""
|
||||
|
@ -1701,7 +1701,7 @@ class DomainRequestExport(BaseExport):
|
|||
"converted_so_name": Case(
|
||||
# When portfolio is present, use that senior official instead
|
||||
When(
|
||||
portfolio__isnull=False,
|
||||
Q(portfolio__isnull=False) & Q(portfolio__senior_official__isnull=False),
|
||||
then=Concat(
|
||||
Coalesce(F("portfolio__senior_official__first_name"), Value("")),
|
||||
Value(" "),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue