mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
Fix tests
This commit is contained in:
parent
f7df9a3566
commit
e0bc28f2c7
3 changed files with 67 additions and 30 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue