From b59aa81d680f14e6cf03ff1e4ecaa241a2877adc Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 4 Nov 2009 10:31:37 +0000 Subject: [PATCH] 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 --- django/test/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = []