summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMike Edmunds <medmunds@gmail.com>2026-04-14 12:43:07 -0700
committernessita <124304+nessita@users.noreply.github.com>2026-05-06 22:39:16 -0300
commit21dcd9a94fb3e9edeec883d12cd1dcac5e773abe (patch)
tree07dd3abcfc50cd4a1f9ef9692e1550c3670c396f /scripts
parenta276941334624994928c0547eebff4595c5e5532 (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')
0 files changed, 0 insertions, 0 deletions