Changeset 5206
- Timestamp:
- 05/12/07 10:35:11 (2 years ago)
- Files:
-
- django/trunk/docs/testing.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/testing.txt
r5179 r5206 178 178 * `Test Client`_ 179 179 * `TestCase`_ 180 * `E mail services`_180 * `E-mail services`_ 181 181 182 182 Test Client … … 460 460 461 461 At the start of each test case, in addition to installing fixtures, 462 Django clears the contents of the test e mail outbox.463 464 For more detail on e mail services during tests, see `Email services`_.462 Django clears the contents of the test e-mail outbox. 463 464 For more detail on e-mail services during tests, see `E-mail services`_. 465 465 466 466 Assertions … … 503 503 response. 504 504 505 E mail services505 E-mail services 506 506 -------------- 507 507 508 **New in Django development version** 508 509 509 If your view makes use of the `Django e mail services`_, you don't really510 want e mail to be sent every time you run a test using that view.510 If your view makes use of the `Django e-mail services`_, you don't really 511 want e-mail to be sent every time you run a test using that view. 511 512 512 513 When the Django test framework is initialized, it transparently replaces the 513 514 normal `SMTPConnection`_ class with a dummy implementation that redirects all 514 e mail to a dummy outbox. This outbox, stored as ``django.core.mail.outbox``,515 e-mail to a dummy outbox. This outbox, stored as ``django.core.mail.outbox``, 515 516 is a simple list of all `EmailMessage`_ instances that have been sent. 516 517 For example, during test conditions, it would be possible to run the following … … 542 543 mail.outbox = [] 543 544 544 .. _`Django e mail services`: ../email/545 .. _`Django e-mail services`: ../email/ 545 546 .. _`SMTPConnection`: ../email/#the-emailmessage-and-smtpconnection-classes 546 547 .. _`EmailMessage`: ../email/#the-emailmessage-and-smtpconnection-classes … … 670 671 ``teardown_test_environment()`` 671 672 Performs any global post-test teardown, such as removing the instrumentation 672 of the template rendering system and restoring normal e mail services.673 of the template rendering system and restoring normal e-mail services. 673 674 674 675 ``create_test_db(verbosity=1, autoclobber=False)``
