Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rachidatecs committed May 17, 2024
1 parent b6797c3 commit a1ff0b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/registrar/tests/test_views_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ def test_domain_org_name_address_form_federal(self):

session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]

org_name_page.form["federal_agency"] = "Department of State"
org_name_page.form["federal_agency"] = FederalAgency.objects.filter(agency="Department of State").get().id
org_name_page.form["city"] = "Faketown"

self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
Expand All @@ -1456,9 +1456,8 @@ def test_domain_org_name_address_form_federal(self):
success_result_page = org_name_page.form.submit()
self.assertEqual(success_result_page.status_code, 200)

# Check for the old and new value
self.assertContains(success_result_page, federal_agency.id)
self.assertNotContains(success_result_page, "Department of State")
# Check that the agency has not changed
self.assertEqual(self.domain_information.federal_agency.agency, "AMTRAK")

# Do another check on the form itself
form = success_result_page.forms[0]
Expand Down

0 comments on commit a1ff0b6

Please sign in to comment.