mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 15:06:32 +02:00
Merge branch 'main' into za/1530-warning-messages-changing-statuses
This commit is contained in:
commit
7b773c16b7
9 changed files with 648 additions and 189 deletions
|
@ -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,
|
||||
):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue