mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 06:56:33 +02:00
lint + test
This commit is contained in:
parent
e4e1d71526
commit
192e499953
2 changed files with 11 additions and 4 deletions
|
@ -119,7 +119,10 @@ class RequestingEntityForm(RegistrarForm):
|
|||
if not cleaned_data.get("suborganization_city"):
|
||||
self.add_error("suborganization_city", "Enter the city where your suborganization is located.")
|
||||
if not cleaned_data.get("suborganization_state_territory"):
|
||||
self.add_error("suborganization_state_territory", "Select the state, territory, or military post where your suborganization is located")
|
||||
self.add_error(
|
||||
"suborganization_state_territory",
|
||||
"Select the state, territory, or military post where your suborganization is located",
|
||||
)
|
||||
elif not suborganization:
|
||||
self.add_error("sub_organization", "Suborganization is required.")
|
||||
|
||||
|
|
|
@ -1794,9 +1794,13 @@ class TestRequestingEntity(WebTest):
|
|||
form["portfolio_requesting_entity-is_requesting_new_suborganization"] = True
|
||||
response = form.submit()
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
self.assertContains(response, "Requested suborganization is required.", status_code=200)
|
||||
self.assertContains(response, "City is required.", status_code=200)
|
||||
self.assertContains(response, "State, territory, or military post is required.", status_code=200)
|
||||
self.assertContains(response, "Enter the name of your suborganization.", status_code=200)
|
||||
self.assertContains(response, "Enter the city where your suborganization is located.", status_code=200)
|
||||
self.assertContains(
|
||||
response,
|
||||
"Select the state, territory, or military post where your suborganization is located",
|
||||
status_code=200,
|
||||
)
|
||||
|
||||
@override_flag("organization_feature", active=True)
|
||||
@override_flag("organization_requests", active=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue