mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +02:00
linting
This commit is contained in:
parent
4bdf2cbe8f
commit
0641e9ad72
4 changed files with 6 additions and 10 deletions
|
@ -1746,7 +1746,6 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
obj.action_needed_reason_email = body_text
|
||||
should_save = True
|
||||
|
||||
|
||||
if obj.status == original_obj.status:
|
||||
# If the status hasn't changed, let the base function take care of it
|
||||
return super().save_model(request, obj, form, change)
|
||||
|
@ -1968,7 +1967,9 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
if domain_request.action_needed_reason == enum_value and domain_request.action_needed_reason_email:
|
||||
custom_text = domain_request.action_needed_reason_email
|
||||
|
||||
emails[enum_value] = self._get_action_needed_reason_default_email_text(domain_request, enum_value, custom_text)
|
||||
emails[enum_value] = self._get_action_needed_reason_default_email_text(
|
||||
domain_request, enum_value, custom_text
|
||||
)
|
||||
return json.dumps(emails)
|
||||
|
||||
def _get_action_needed_reason_default_email_text(self, domain_request, action_needed_reason: str, custom_text=None):
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import time
|
||||
import logging
|
||||
import hashlib
|
||||
from urllib.parse import urlparse, urlunparse, urlencode
|
||||
|
||||
|
||||
|
|
|
@ -1485,9 +1485,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
domain_request.save()
|
||||
self.transition_state_and_send_email(domain_request, action_needed, action_needed_reason=questionable_so)
|
||||
|
||||
self.assert_email_is_accurate(
|
||||
"custom email content", 4, EMAIL, bcc_email_address=BCC_EMAIL
|
||||
)
|
||||
self.assert_email_is_accurate("custom email content", 4, EMAIL, bcc_email_address=BCC_EMAIL)
|
||||
self.assertEqual(len(self.mock_client.EMAILS_SENT), 5)
|
||||
|
||||
def test_save_model_sends_submitted_email(self):
|
||||
|
@ -2234,6 +2232,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
self.assertContains(response, "Yes, select ineligible status")
|
||||
|
||||
def test_readonly_when_restricted_creator(self):
|
||||
self.maxDiff = None
|
||||
with less_console_noise():
|
||||
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.IN_REVIEW)
|
||||
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
|
||||
|
@ -2252,7 +2251,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"is_election_board",
|
||||
"federal_agency",
|
||||
"status_history",
|
||||
"action_needed_reason_email",
|
||||
"id",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
|
@ -2314,7 +2312,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"is_election_board",
|
||||
"federal_agency",
|
||||
"status_history",
|
||||
"action_needed_reason_email",
|
||||
"creator",
|
||||
"about_your_organization",
|
||||
"requested_domain",
|
||||
|
@ -2346,7 +2343,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"is_election_board",
|
||||
"federal_agency",
|
||||
"status_history",
|
||||
"action_needed_reason_email",
|
||||
]
|
||||
|
||||
self.assertEqual(readonly_fields, expected_fields)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue