diff options
| author | Mike Edmunds <medmunds@gmail.com> | 2026-04-14 12:43:07 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2026-05-06 22:39:16 -0300 |
| commit | 21dcd9a94fb3e9edeec883d12cd1dcac5e773abe (patch) | |
| tree | 07dd3abcfc50cd4a1f9ef9692e1550c3670c396f /scripts/prepare_commit_msg.py | |
| parent | a276941334624994928c0547eebff4595c5e5532 (diff) | |
Refs #35514 -- Cleaned up logging and middleware tests.
Simplified and removed use of soon-to-be-deprecated or removed features
from tests for AdminEmailHandler and BrokenLinkEmailsMiddleware. Added
or updated cases to ensure `fail_silently` usage remains consistent
during the transition to email providers.
Changed custom FailingEmailBackend to respect fail_silently and record
its use in a class-level property.
In AdminEmailHandlerTest:
* Added make_log_record() helper to reduce duplicated code.
* Changed test_fail_silently() to send through the FailingEmailBackend,
which will fail if not initialized with fail_silently=True. (Rather
than inspecting attributes of a soon-to-be-deprecated connection.)
* Simplified test_uses_custom_email_backend() by replacing monkeypatches
with inspectable custom backend.
* In test_customize_send_mail_method(), removed use of the undocumented
self.connection() method and the soon-to-be-deprecated `connection`
arg to mail_managers(). This test verifies a subclass can customize
sending by mailing the managers rather than the admins. Involving a
email backend connection was irrelevant.
In BrokenLinkEmailsMiddlewareTest, added a case with FailingEmailBackend
to verify send uses fail_silently=True.
Diffstat (limited to 'scripts/prepare_commit_msg.py')
0 files changed, 0 insertions, 0 deletions
