Updated tests for new fk FederalAgency

This commit is contained in:
Erin 2024-05-02 11:56:18 -07:00
parent 98183a961f
commit 1adf513db6
No known key found for this signature in database
GPG key ID: 1CAD275313C62460
3 changed files with 16 additions and 6 deletions

View file

@ -16,6 +16,7 @@ from registrar.models import (
Contact,
User,
Website,
FederalAgency
)
from registrar.views.domain_request import DomainRequestWizard, Step
@ -178,7 +179,8 @@ class DomainRequestTests(TestWithUser, WebTest):
org_contact_page = federal_result.follow()
org_contact_form = org_contact_page.forms[0]
# federal agency so we have to fill in federal_agency
org_contact_form["organization_contact-federal_agency"] = "General Services Administration"
federal_agency, _ = FederalAgency.objects.get_or_create(agency="General Services Administration")
org_contact_form["organization_contact-federal_agency"] = federal_agency
org_contact_form["organization_contact-organization_name"] = "Testorg"
org_contact_form["organization_contact-address_line1"] = "address 1"
org_contact_form["organization_contact-address_line2"] = "address 2"
@ -2020,7 +2022,8 @@ class DomainRequestTests(TestWithUser, WebTest):
org_contact_page = federal_result.follow()
org_contact_form = org_contact_page.forms[0]
# federal agency so we have to fill in federal_agency
org_contact_form["organization_contact-federal_agency"] = "General Services Administration"
federal_agency, _ = FederalAgency.objects.get_or_create(agency="General Services Administration")
org_contact_form["organization_contact-federal_agency"] = federal_agency
org_contact_form["organization_contact-organization_name"] = "Testorg"
org_contact_form["organization_contact-address_line1"] = "address 1"
org_contact_form["organization_contact-address_line2"] = "address 2"
@ -2091,7 +2094,8 @@ class DomainRequestTests(TestWithUser, WebTest):
org_contact_page = federal_result.follow()
org_contact_form = org_contact_page.forms[0]
# federal agency so we have to fill in federal_agency
org_contact_form["organization_contact-federal_agency"] = "General Services Administration"
federal_agency, _ = FederalAgency.objects.get_or_create(agency="General Services Administration")
org_contact_form["organization_contact-federal_agency"] = federal_agency
org_contact_form["organization_contact-organization_name"] = "Testorg"
org_contact_form["organization_contact-address_line1"] = "address 1"
org_contact_form["organization_contact-address_line2"] = "address 2"