Fix linter and failing tests

This commit is contained in:
Seamus Johnston 2022-12-28 10:01:04 -06:00
parent 2a9d16a555
commit 6641fa3982
No known key found for this signature in database
GPG key ID: 2F21225985069105
4 changed files with 16 additions and 6 deletions

View file

@ -281,7 +281,10 @@ class AnythingElseForm(RegistrarForm):
class RequirementsForm(RegistrarForm):
is_policy_acknowledged = forms.BooleanField(
label="I read and agree to the requirements for registering and operating .gov domains."
label=(
"I read and agree to the requirements for registering "
"and operating .gov domains."
)
)

View file

@ -93,7 +93,11 @@ class DomainApplication(TimeStampedModel):
ARMED_FORCES_AP = "AP", "Armed Forces Pacific (AP)"
class OrganizationChoices(models.TextChoices):
FEDERAL = "federal", "Federal: an agency of the U.S. government's executive, legislative, or judicial branches"
FEDERAL = (
"federal",
"Federal: an agency of the U.S. government's executive, legislative, "
"or judicial branches",
)
INTERSTATE = "interstate", "Interstate: an organization of two or more states"
STATE_OR_TERRITORY = "state_or_territory", (
"State or territory: one of the 50 U.S. states, the District of "
@ -108,6 +112,7 @@ class DomainApplication(TimeStampedModel):
CITY = "city", "City: a city, town, township, village, etc."
SPECIAL_DISTRICT = "special_district", (
"Special district: an independent organization within a single state"
)
SCHOOL_DISTRICT = "school_district", (
"School district: a school district that is not part of a local government"
)

View file

@ -13,8 +13,7 @@
<fieldset id="organization_type__fieldset" class="usa-fieldset">
<legend class="usa-legend">
<h2> What kind of U.S.-based government organization do you represent?
</h2>
<h2> What kind of U.S.-based government organization do you represent?</h2>
</legend>
{{ wizard.form.organization_type.errors }}
{% for choice in choices.values %}

View file

@ -85,7 +85,8 @@ class LoggedInTests(TestWithUser):
def test_application_form_view(self):
response = self.client.get("/register/", follow=True)
self.assertContains(
response, "What kind of government organization do you represent?"
response,
"What kind of U.S.-based government organization do you represent?",
)
@ -111,7 +112,9 @@ class DomainApplicationTests(TestWithUser, WebTest):
page = self.app.get(reverse("application")).follow()
# submitting should get back the same page if the required field is empty
result = page.form.submit()
self.assertIn("What kind of government organization do you represent?", result)
self.assertIn(
"What kind of U.S.-based government organization do you represent?", result
)
def test_application_form_submission(self):
"""Can fill out the entire form and submit.