mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Fix linting errors
This commit is contained in:
parent
fd687b8e3b
commit
45e1dcbba2
2 changed files with 6 additions and 7 deletions
|
@ -4,6 +4,8 @@ from __future__ import annotations # allows forward references in annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
@ -72,7 +74,7 @@ class OrganizationElectionForm(RegistrarForm):
|
||||||
(False, "No"),
|
(False, "No"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
required=False
|
required=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,12 +300,12 @@ def _get_organization_type(wizard: ApplicationWizard) -> Union[str, None]:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def show_organization_federal(wizard: ApplicationWizard) -> Bool:
|
def show_organization_federal(wizard: ApplicationWizard) -> bool:
|
||||||
"""Show this step if the answer to the first question was "federal"."""
|
"""Show this step if the answer to the first question was "federal"."""
|
||||||
return _get_organization_type(wizard) == "Federal"
|
return _get_organization_type(wizard) == "Federal"
|
||||||
|
|
||||||
|
|
||||||
def show_organization_election(wizard: ApplicationWizard) -> Bool:
|
def show_organization_election(wizard: ApplicationWizard) -> bool:
|
||||||
"""Show this step if the answer to the first question implies it.
|
"""Show this step if the answer to the first question implies it.
|
||||||
|
|
||||||
This shows for answers that aren't "Federal" or "Interstate".
|
This shows for answers that aren't "Federal" or "Interstate".
|
||||||
|
|
|
@ -134,7 +134,6 @@ class FormTests(TestWithUser, WebTest):
|
||||||
self.assertEquals(type_result.status_code, 302)
|
self.assertEquals(type_result.status_code, 302)
|
||||||
self.assertEquals(type_result["Location"], "/register/organization_federal/")
|
self.assertEquals(type_result["Location"], "/register/organization_federal/")
|
||||||
|
|
||||||
|
|
||||||
# ---- FEDERAL BRANCH PAGE ----
|
# ---- FEDERAL BRANCH PAGE ----
|
||||||
# Follow the redirect to the next form page
|
# Follow the redirect to the next form page
|
||||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
|
@ -147,9 +146,7 @@ class FormTests(TestWithUser, WebTest):
|
||||||
federal_result = federal_form.submit()
|
federal_result = federal_form.submit()
|
||||||
|
|
||||||
self.assertEquals(federal_result.status_code, 302)
|
self.assertEquals(federal_result.status_code, 302)
|
||||||
self.assertEquals(
|
self.assertEquals(federal_result["Location"], "/register/organization_contact/")
|
||||||
federal_result["Location"], "/register/organization_contact/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ---- ORG CONTACT PAGE ----
|
# ---- ORG CONTACT PAGE ----
|
||||||
# Follow the redirect to the next form page
|
# Follow the redirect to the next form page
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue