summaryrefslogtreecommitdiff
path: root/docs/topics/testing.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-05 06:39:26 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-05 06:39:26 +0000
commit5cd7af58c933a093aa17515d099d45bc9347d2c8 (patch)
treed8261a2c533d9d617aa0ebe437e7481e31784f43 /docs/topics/testing.txt
parent7e4d2778e61234cbd6698dafeb31d426cb83f992 (diff)
Fixed a typo and clarified how django.core.mail.outbox works in the testing framework. Fixed #9237.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/testing.txt')
-rw-r--r--docs/topics/testing.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index 0916f52388..4f37b3bdc0 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -950,7 +950,7 @@ Django, such as your machine's mail server, if you're running one.)
.. currentmodule:: django.core.mail
-.. data:: django.core.mail.output
+.. data:: django.core.mail.outbox
During test running, each outgoing e-mail is saved in
``django.core.mail.outbox``. This is a simple list of all
@@ -961,6 +961,11 @@ dummy :class:`<~django.core.mail.SMTPConnection>`. When the test framework is
torn down, the standard :class:`<~django.core.mail.SMTPConnection>` class is
restored, and the test outbox is destroyed.
+The ``outbox`` attribute is a special attribute that is created *only* when
+the tests are run. It doesn't normally exist as part of the
+:mod:`django.core.mail` module and you can't import it directly. The code
+below shows how to access this attribute correctly.
+
Here's an example test that examines ``django.core.mail.outbox`` for length
and contents::