summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-11-04 10:31:37 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-11-04 10:31:37 +0000
commitb59aa81d680f14e6cf03ff1e4ecaa241a2877adc (patch)
tree4eb5099472fc10be4553bcb796e913c2bdf8fe07
parent0e49b397f93375d0c1a8223f5ff8830a0e68a1e3 (diff)
Corrected the order of operations in the test environment setup to ensure 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
-rw-r--r--django/test/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/utils.py b/django/test/utils.py
index a30bb7e41c..9d39eee926 100644
--- a/django/test/utils.py
+++ b/django/test/utils.py
@@ -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 = []