diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 55a7c788d..ab2609c40 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -572,7 +572,7 @@ class TestDomainApplicationAdmin(MockEppLib): # Perform assertions on the mock call itself mock_client_instance.send_email.assert_called_once() - + @boto3_mocking.patching def test_save_model_sets_restricted_status_on_user(self): # make sure there is no user with this email diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py index b496e2358..d6053efb5 100644 --- a/src/registrar/tests/test_models.py +++ b/src/registrar/tests/test_models.py @@ -313,7 +313,7 @@ class TestDomainApplication(TestCase): against transition rules""" application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED) - + mock_client = MockSESClient with boto3_mocking.clients.handler_for("sesv2", mock_client): with self.assertRaises(TransitionNotAllowed): @@ -624,7 +624,7 @@ class TestDomainApplication(TestCase): mock_client = MockSESClient with boto3_mocking.clients.handler_for("sesv2", mock_client): - # Use patch to temporarily replace is_active with the custom implementation + # Use patch to temporarily replace is_active with the custom implementation with patch.object(Domain, "is_active", custom_is_active): # Now, when you call is_active on Domain, it will return True with self.assertRaises(TransitionNotAllowed): @@ -640,7 +640,7 @@ class TestPermissions(TestCase): draft_domain, _ = DraftDomain.objects.get_or_create(name="igorville.gov") user, _ = User.objects.get_or_create() application = DomainApplication.objects.create(creator=user, requested_domain=draft_domain) - + mock_client = MagicMock() with boto3_mocking.clients.handler_for("sesv2", mock_client): with less_console_noise(): diff --git a/src/registrar/tests/test_models_domain.py b/src/registrar/tests/test_models_domain.py index 9c3e46c6e..74d442eea 100644 --- a/src/registrar/tests/test_models_domain.py +++ b/src/registrar/tests/test_models_domain.py @@ -250,7 +250,7 @@ class TestDomainCache(MockEppLib): class TestDomainCreation(MockEppLib): """Rule: An approved domain application must result in a domain""" - + @boto3_mocking.patching def test_approved_application_creates_domain_locally(self): """ diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index ea6b95c2e..caecb6c7b 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -1553,7 +1553,7 @@ class TestDomainNameservers(TestDomainOverview): # attempt to submit the form without two hosts, both subdomains, # only one has ips nameservers_page.form["form-1-server"] = "ns2.igorville.gov" - + with less_console_noise(): # swallow log warning message result = nameservers_page.form.submit() # form submission was a post with an error, response should be a 200 diff --git a/src/registrar/utility/email.py b/src/registrar/utility/email.py index cb1550801..d56c02cbf 100644 --- a/src/registrar/utility/email.py +++ b/src/registrar/utility/email.py @@ -8,6 +8,7 @@ from django.template.loader import get_template logger = logging.getLogger(__name__) + class EmailSendingError(RuntimeError): """Local error for handling all failures when sending email."""