Merge branch 'main' into za/1530-warning-messages-changing-statuses

This commit is contained in:
zandercymatics 2024-03-12 16:45:21 -06:00
commit 7b773c16b7
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
9 changed files with 648 additions and 189 deletions

View file

@ -549,6 +549,7 @@ def completed_domain_request(
user=False,
submitter=False,
name="city.gov",
investigator=None,
):
"""A completed domain request."""
if not user:
@ -578,6 +579,13 @@ def completed_domain_request(
email="testy2@town.com",
phone="(555) 555 5557",
)
if not investigator:
investigator, _ = User.objects.get_or_create(
username="incrediblyfakeinvestigator",
first_name="Joe",
last_name="Bob",
is_staff=True,
)
domain_request_kwargs = dict(
organization_type="federal",
federal_type="executive",
@ -593,6 +601,7 @@ def completed_domain_request(
submitter=submitter,
creator=user,
status=status,
investigator=investigator,
)
if has_about_your_organization:
domain_request_kwargs["about_your_organization"] = "e-Government"
@ -611,6 +620,13 @@ def completed_domain_request(
return domain_request
def set_domain_request_investigators(domain_request_list: list[DomainRequest], investigator_user: User):
"""Helper method that sets the investigator field of all provided domain requests"""
for request in domain_request_list:
request.investigator = investigator_user
request.save()
def multiple_unalphabetical_domain_objects(
domain_type=AuditedAdminMockData.DOMAIN_REQUEST,
):