From e4c15ee28b30817d201130ed0e79384d78ff65e9 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:40:19 -0600 Subject: [PATCH] Fix unit test --- src/registrar/forms/domain_request_wizard.py | 8 ++++---- src/registrar/tests/test_views_portfolio.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index 0b560f19c..bfbc22124 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -115,13 +115,13 @@ def clean(self): if is_requesting_new_suborganization: # Validate custom suborganization fields if not cleaned_data.get("requested_suborganization"): - self.add_error("requested_suborganization", "Requested suborganization is required") + self.add_error("requested_suborganization", "Requested suborganization is required.") if not cleaned_data.get("suborganization_city"): - self.add_error("suborganization_city", "City is required") + self.add_error("suborganization_city", "City is required.") if not cleaned_data.get("suborganization_state_territory"): - self.add_error("suborganization_state_territory", "State, territory, or military post is required") + self.add_error("suborganization_state_territory", "State, territory, or military post is required.") elif not suborganization: - self.add_error("sub_organization", "Select a suborganization.") + self.add_error("sub_organization", "Suborganization is required.") return cleaned_data diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index 45357cbf7..402d23b70 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -1788,15 +1788,15 @@ def test_requesting_entity_page_errors(self): response = form.submit() self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id) - self.assertContains(response, "Select a suborganization.", status_code=200) + self.assertContains(response, "Suborganization is required.", status_code=200) # Test missing custom suborganization details 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, "Enter details for your organization name.", status_code=200) - self.assertContains(response, "Enter details for your city.", status_code=200) - self.assertContains(response, "Enter details for your state or territory.", status_code=200) + 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) @override_flag("organization_feature", active=True) @override_flag("organization_requests", active=True)