mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Add in new unit tests and fix logic
This commit is contained in:
parent
30b4ad97a3
commit
03fff1e603
4 changed files with 89 additions and 151 deletions
|
@ -1006,22 +1006,18 @@ class DomainRequest(TimeStampedModel):
|
|||
def _is_additional_details_complete(self):
|
||||
return (
|
||||
(
|
||||
(self.has_cisa_representative is True and self.cisa_representative_email is not None and self.cisa_representative_email != '')
|
||||
or self.has_cisa_representative is False
|
||||
)
|
||||
and
|
||||
(
|
||||
|
||||
(self.has_anything_else_text is True and self.anything_else is not None and self.anything_else != '')
|
||||
or self.has_anything_else_text is False
|
||||
|
||||
self.has_cisa_representative is True
|
||||
and self.cisa_representative_email is not None
|
||||
and self.cisa_representative_email != ""
|
||||
)
|
||||
or self.has_cisa_representative is False
|
||||
) and (
|
||||
(self.has_anything_else_text is True and self.anything_else is not None and self.anything_else != "")
|
||||
or self.has_anything_else_text is False
|
||||
)
|
||||
|
||||
# def _is_policy_acknoledgment_complete(self):
|
||||
# return (
|
||||
|
||||
# )
|
||||
def _is_policy_acknowledgement_complete(self):
|
||||
return self.is_policy_acknowledged is not None
|
||||
|
||||
def _is_general_form_complete(self):
|
||||
return (
|
||||
|
@ -1032,6 +1028,7 @@ class DomainRequest(TimeStampedModel):
|
|||
and self._is_submitter_complete()
|
||||
and self._is_other_contacts_complete()
|
||||
and self._is_additional_details_complete()
|
||||
and self._is_policy_acknowledgement_complete()
|
||||
)
|
||||
|
||||
def _form_complete(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue