Skip to content

Commit 3361768

Browse files
committed
doc
1 parent 8552948 commit 3361768

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_django_settings_module.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,14 @@ def test_no_django_settings_but_django_imported(testdir, monkeypatch):
452452
assert r.ret == 0
453453

454454

455-
def test_django_settings_is_configured_cached(testdir, monkeypatch):
455+
def test_django_settings_is_configured_first(testdir, monkeypatch):
456456
"""
457-
``django_settings_is_configured`` should return the initial value always.
457+
The value from ``django_settings_is_configured`` should be used internally
458+
always.
458459
459460
This avoids having the _dj_autoclear_mailbox autouse fixture trigger
460-
"AttributeError: module 'django.core.mail' has no attribute 'outbox'".
461+
"AttributeError: module 'django.core.mail' has no attribute 'outbox'",
462+
because Django / the test environment was not setup initially.
461463
"""
462464
monkeypatch.delenv("DJANGO_SETTINGS_MODULE")
463465

0 commit comments

Comments
 (0)