diff options
| author | Mike Edmunds <medmunds@gmail.com> | 2026-03-30 11:48:52 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2026-05-08 08:41:47 -0300 |
| commit | 3e0190a4586e71c92ead3c01323bf0cb9fe1a03c (patch) | |
| tree | 9505b04c7c0496fc17529497bfb2bda4534ed9ce /scripts | |
| parent | 4ca85546a52227b9ef33d5ab328a2f00625a8483 (diff) | |
Refs #35514 -- Decoupled settings from functional EmailBackend tests.
Reworked tests/mail/test_backends.py so that cases covering functional
behavior don't depend on EMAIL_BACKEND or other EMAIL_* settings. (But
kept unchanged existing tests to verify backend instance properties are
initialized from EMAIL_* settings.)
Most backend behavior tests had implicitly relied on email settings
overrides in test setup (e.g., to use an emulated SMTP server). They
either used mail.get_connection(...) or directly constructed a backend
class instance with the specific attributes being tested, relying on
the settings overrides to initialize other required attributes. That
approach won't work after those settings are deprecated as part of
EMAIL_PROVIDERS.
Instead, replaced backend construction in "functional" tests with new
SharedEmailBackendTests.create_backend() which constructs the testable
backend instance with _all_ options needed to avoid global settings.
Tests to verify the settings are read correctly continue to directly
construct backend instances, without using create_backend().
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
