summaryrefslogtreecommitdiff
path: root/tests/regressiontests/mail/tests.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-02-16 20:47:39 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-02-16 20:47:39 +0000
commit8ada8d7c0391572d0b1f0408394d041e59d19be4 (patch)
tree13e8d6beb3e37149aa2f4c6c0292909999b8fe01 /tests/regressiontests/mail/tests.py
parentecc55503f40e375b957aa9dfaf8db34e8f348f63 (diff)
Fixed #9214: EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/mail/tests.py')
-rw-r--r--tests/regressiontests/mail/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/mail/tests.py b/tests/regressiontests/mail/tests.py
index 4317a66b79..40e2f7665f 100644
--- a/tests/regressiontests/mail/tests.py
+++ b/tests/regressiontests/mail/tests.py
@@ -88,4 +88,11 @@ BadHeaderError: Header values can't contain newlines (got u'Subject\nInjection T
>>> settings.ADMINS = old_admins
>>> settings.MANAGERS = old_managers
+# Make sure we can manually set the From header (#9214)
+
+>>> email = EmailMessage('Subject', 'Content', 'bounce@example.com', ['to@example.com'], headers={'From': 'from@example.com'})
+>>> message = email.message()
+>>> message['From']
+'from@example.com'
+
"""