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
This commit is contained in:
parent
0e49b397f9
commit
b59aa81d68
|
@ -43,8 +43,8 @@ def setup_test_environment():
|
||||||
mail.original_SMTPConnection = mail.SMTPConnection
|
mail.original_SMTPConnection = mail.SMTPConnection
|
||||||
mail.SMTPConnection = locmem.EmailBackend
|
mail.SMTPConnection = locmem.EmailBackend
|
||||||
|
|
||||||
settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem'
|
|
||||||
mail.original_email_backend = settings.EMAIL_BACKEND
|
mail.original_email_backend = settings.EMAIL_BACKEND
|
||||||
|
settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem'
|
||||||
|
|
||||||
mail.outbox = []
|
mail.outbox = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue