mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 10:29:23 +02:00
linted
This commit is contained in:
parent
6ecd9e59fc
commit
9fecf11558
3 changed files with 14 additions and 6 deletions
|
@ -806,7 +806,7 @@ def create_ready_domain():
|
||||||
|
|
||||||
|
|
||||||
# TODO in 1793: Remove the federal agency/updated federal agency fields
|
# TODO in 1793: Remove the federal agency/updated federal agency fields
|
||||||
def completed_domain_request(
|
def completed_domain_request( # noqa
|
||||||
has_other_contacts=True,
|
has_other_contacts=True,
|
||||||
has_current_website=True,
|
has_current_website=True,
|
||||||
has_alternative_gov_domain=True,
|
has_alternative_gov_domain=True,
|
||||||
|
|
|
@ -870,7 +870,9 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
"""On the Additional details page, the form preselects "no" when has_cisa_representative
|
"""On the Additional details page, the form preselects "no" when has_cisa_representative
|
||||||
and anything_else is no"""
|
and anything_else is no"""
|
||||||
|
|
||||||
domain_request = completed_domain_request(user=self.user, has_anything_else=False, has_cisa_representative=False)
|
domain_request = completed_domain_request(
|
||||||
|
user=self.user, has_anything_else=False, has_cisa_representative=False
|
||||||
|
)
|
||||||
|
|
||||||
# Unlike the other contacts form, the no button is tracked with these boolean fields.
|
# Unlike the other contacts form, the no button is tracked with these boolean fields.
|
||||||
# This means that we should expect this to correlate with the no button.
|
# This means that we should expect this to correlate with the no button.
|
||||||
|
@ -959,7 +961,9 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
def test_submitting_additional_details_populates_cisa_representative_and_anything_else(self):
|
def test_submitting_additional_details_populates_cisa_representative_and_anything_else(self):
|
||||||
"""When a user submits the Additional Details form,
|
"""When a user submits the Additional Details form,
|
||||||
the domain request's data gets submitted"""
|
the domain request's data gets submitted"""
|
||||||
domain_request = completed_domain_request(name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False)
|
domain_request = completed_domain_request(
|
||||||
|
name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False
|
||||||
|
)
|
||||||
|
|
||||||
# Make sure we have the data we need for the test
|
# Make sure we have the data we need for the test
|
||||||
self.assertEqual(domain_request.anything_else, None)
|
self.assertEqual(domain_request.anything_else, None)
|
||||||
|
@ -1009,7 +1013,9 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
|
|
||||||
def test_if_cisa_representative_yes_no_form_is_yes_then_field_is_required(self):
|
def test_if_cisa_representative_yes_no_form_is_yes_then_field_is_required(self):
|
||||||
"""Applicants with a cisa representative must provide a value"""
|
"""Applicants with a cisa representative must provide a value"""
|
||||||
domain_request = completed_domain_request(name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False)
|
domain_request = completed_domain_request(
|
||||||
|
name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False
|
||||||
|
)
|
||||||
|
|
||||||
# prime the form by visiting /edit
|
# prime the form by visiting /edit
|
||||||
self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
|
self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
|
||||||
|
@ -1070,7 +1076,9 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
def test_additional_details_form_fields_required(self):
|
def test_additional_details_form_fields_required(self):
|
||||||
"""When a user submits the Additional Details form without checking the
|
"""When a user submits the Additional Details form without checking the
|
||||||
has_cisa_representative and has_anything_else_text fields, the form should deny this action"""
|
has_cisa_representative and has_anything_else_text fields, the form should deny this action"""
|
||||||
domain_request = completed_domain_request(name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False)
|
domain_request = completed_domain_request(
|
||||||
|
name="cisareps.gov", user=self.user, has_anything_else=False, has_cisa_representative=False
|
||||||
|
)
|
||||||
|
|
||||||
self.assertEqual(domain_request.has_anything_else_text, None)
|
self.assertEqual(domain_request.has_anything_else_text, None)
|
||||||
self.assertEqual(domain_request.has_cisa_representative, None)
|
self.assertEqual(domain_request.has_cisa_representative, None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue