Skip to content

Commit

Permalink
Corrected the order of operations in the test environment setup to en…
Browse files Browse the repository at this point in the history
…sure that the original email backend can be restored. Thanks to koenb for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Nov 4, 2009
1 parent 0e49b39 commit b59aa81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/test/utils.py
Expand Up @@ -43,8 +43,8 @@ def setup_test_environment():
mail.original_SMTPConnection = mail.SMTPConnection
mail.SMTPConnection = locmem.EmailBackend

settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem'
mail.original_email_backend = settings.EMAIL_BACKEND
settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem'

mail.outbox = []

Expand Down

0 comments on commit b59aa81

Please sign in to comment.