Black formatting

This commit is contained in:
zandercymatics 2023-12-21 12:27:18 -07:00
parent ad9e64f063
commit d3ceb64956
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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():

View file

@ -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):
"""

View file

@ -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

View file

@ -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."""