Fix tests

This commit is contained in:
zandercymatics 2024-09-05 15:17:53 -06:00
parent f7df9a3566
commit e0bc28f2c7
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 67 additions and 30 deletions

View file

@ -1,21 +1,20 @@
from django.http import HttpRequest
from registrar.models.domain_request import DomainRequest
from waffle.decorators import flag_is_active
from django.template.loader import get_template
def get_all_action_needed_reason_emails(request, domain_request):
"""Returns a dictionary of every action needed reason and its associated email
for this particular domain request."""
"""Returns a dictionary of every action needed reason and its associated email
for this particular domain request."""
emails = {}
for action_needed_reason in domain_request.ActionNeededReasons:
# Map the action_needed_reason to its default email
emails[action_needed_reason.value] = get_action_needed_reason_default_email(
request, domain_request, action_needed_reason.value
)
emails = {}
for action_needed_reason in domain_request.ActionNeededReasons:
# Map the action_needed_reason to its default email
emails[action_needed_reason.value] = get_action_needed_reason_default_email(
request, domain_request, action_needed_reason.value
)
return emails
return emails
def get_action_needed_reason_default_email(request, domain_request, action_needed_reason):
@ -39,4 +38,4 @@ def get_action_needed_reason_default_email(request, domain_request, action_neede
if email_body_text:
email_body_text_cleaned = email_body_text.strip().lstrip("\n")
return email_body_text_cleaned
return email_body_text_cleaned