mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-22 17:21:06 +02:00
Clarify test names
This commit is contained in:
parent
dafac97776
commit
bf1d3f1ad7
1 changed files with 11 additions and 7 deletions
|
@ -1496,13 +1496,15 @@ class TestDomainRequestCustomSave(TestCase):
|
||||||
self.assertEqual(domain_request.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY)
|
self.assertEqual(domain_request.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_create_or_update_organization_type_existing_instance_updates_election_board_to_none(self):
|
def test_existing_instance_updates_election_board_to_none(self):
|
||||||
"""Test create_or_update_organization_type for an existing instance."""
|
"""Test create_or_update_organization_type for an existing instance, first to True and then to None.
|
||||||
|
Start our with is_election_board as none to simulate a situation where the request was started, but
|
||||||
|
only completed to the point of filling out the generic_org_type."""
|
||||||
domain_request = completed_domain_request(
|
domain_request = completed_domain_request(
|
||||||
status=DomainRequest.DomainRequestStatus.STARTED,
|
status=DomainRequest.DomainRequestStatus.STARTED,
|
||||||
name="started.gov",
|
name="started.gov",
|
||||||
generic_org_type=DomainRequest.OrganizationChoices.CITY,
|
generic_org_type=DomainRequest.OrganizationChoices.CITY,
|
||||||
is_election_board=False,
|
is_election_board=None,
|
||||||
)
|
)
|
||||||
domain_request.is_election_board = True
|
domain_request.is_election_board = True
|
||||||
domain_request.save()
|
domain_request.save()
|
||||||
|
@ -1510,7 +1512,7 @@ class TestDomainRequestCustomSave(TestCase):
|
||||||
self.assertEqual(domain_request.is_election_board, True)
|
self.assertEqual(domain_request.is_election_board, True)
|
||||||
self.assertEqual(domain_request.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY_ELECTION)
|
self.assertEqual(domain_request.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY_ELECTION)
|
||||||
|
|
||||||
# Try reverting the election board value
|
# Try reverting the election board value.
|
||||||
domain_request.is_election_board = None
|
domain_request.is_election_board = None
|
||||||
domain_request.save()
|
domain_request.save()
|
||||||
|
|
||||||
|
@ -1670,13 +1672,15 @@ class TestDomainInformationCustomSave(TestCase):
|
||||||
self.assertEqual(domain_information.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY)
|
self.assertEqual(domain_information.organization_type, DomainRequest.OrgChoicesElectionOffice.CITY)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_create_or_update_organization_type_existing_instance_updates_election_board_to_none(self):
|
def test_existing_instance_update_election_board_to_none(self):
|
||||||
"""Test create_or_update_organization_type for an existing instance."""
|
"""Test create_or_update_organization_type for an existing instance, first to True and then to None.
|
||||||
|
Start our with is_election_board as none to simulate a situation where the request was started, but
|
||||||
|
only completed to the point of filling out the generic_org_type."""
|
||||||
domain_request = completed_domain_request(
|
domain_request = completed_domain_request(
|
||||||
status=DomainRequest.DomainRequestStatus.STARTED,
|
status=DomainRequest.DomainRequestStatus.STARTED,
|
||||||
name="started.gov",
|
name="started.gov",
|
||||||
generic_org_type=DomainRequest.OrganizationChoices.CITY,
|
generic_org_type=DomainRequest.OrganizationChoices.CITY,
|
||||||
is_election_board=False,
|
is_election_board=None,
|
||||||
)
|
)
|
||||||
domain_information = DomainInformation.create_from_da(domain_request)
|
domain_information = DomainInformation.create_from_da(domain_request)
|
||||||
domain_information.is_election_board = True
|
domain_information.is_election_board = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue