We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f18a4d1 commit 8f104d2Copy full SHA for 8f104d2
docs/changelog.rst
@@ -30,7 +30,15 @@ Compatibility
30
removed. If you have relied on this to get an empty outbox for your
31
test, you should change tests to use the ``mailoutbox`` fixture instead.
32
See documentation of ``mailoutbox`` fixture for usage. If you try to
33
- access mail.outbox directly, AssertionError will be raised.
+ access mail.outbox directly, AssertionError will be raised. If you
34
+ previously relied on the old behaviour and do not want to change your
35
+ tests, put this in your project conftest.py::
36
+
37
+ @pytest.fixture(autouse=True)
38
+ def clear_outbox():
39
+ from django.core import mail
40
+ mail.outbox = []
41
42
43
3.0.0
44
-----
0 commit comments