mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 08:52:16 +02:00
Add in other contacts rationale check and clean up tests
This commit is contained in:
parent
fa1fcba49a
commit
9f2a9594f6
4 changed files with 22 additions and 30 deletions
|
@ -1655,6 +1655,7 @@ class TestDomainRequestIncomplete(TestCase):
|
|||
requested_domain=draft_domain,
|
||||
purpose="Some purpose",
|
||||
submitter=you,
|
||||
no_other_contacts_rationale=None,
|
||||
has_cisa_representative=True,
|
||||
cisa_representative_email="somerep@cisa.com",
|
||||
has_anything_else_text=True,
|
||||
|
@ -1781,10 +1782,24 @@ class TestDomainRequestIncomplete(TestCase):
|
|||
contact.save()
|
||||
self.assertFalse(self.domain_request._is_other_contacts_complete())
|
||||
|
||||
def test_is_other_contacts_complete(self):
|
||||
def test_is_other_contacts_complete_all_none(self):
|
||||
self.domain_request.other_contacts.clear()
|
||||
self.assertFalse(self.domain_request._is_other_contacts_complete())
|
||||
|
||||
def test_is_other_contacts_False_and_has_rationale(self):
|
||||
# Click radio button "No" for no other contacts and give rationale
|
||||
self.domain_request.other_contacts.clear()
|
||||
self.domain_request.other_contacts.exists = False
|
||||
self.domain_request.no_other_contacts_rationale = "Some rationale"
|
||||
self.assertTrue(self.domain_request._is_other_contacts_complete())
|
||||
|
||||
def test_is_other_contacts_False_and_NO_rationale(self):
|
||||
# Click radio button "No" for no other contacts and DONT give rationale
|
||||
self.domain_request.other_contacts.clear()
|
||||
self.domain_request.other_contacts.exists = False
|
||||
self.domain_request.no_other_contacts_rationale = None
|
||||
self.assertFalse(self.domain_request._is_other_contacts_complete())
|
||||
|
||||
def test_is_additional_details_complete(self):
|
||||
test_cases = [
|
||||
# CISA Rep - Yes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue