summaryrefslogtreecommitdiff
path: root/tests/regressiontests/mail/tests.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-04-01 15:16:26 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-04-01 15:16:26 +0000
commitdb5be42c124886eab758e5f4c181db32af174e23 (patch)
tree803e8feb33d9fb0ced24fecfdf402d3d534b6baa /tests/regressiontests/mail/tests.py
parent271bcda04af23bd4deb9656edd59038537f301c5 (diff)
Fixed #13259 -- Ensure that multiple calls to message() don't corrupt any extra message headers. Thanks to canburak for the report, and Andi Albrecht for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/mail/tests.py')
-rw-r--r--tests/regressiontests/mail/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/mail/tests.py b/tests/regressiontests/mail/tests.py
index e27804c11d..84be585bfd 100644
--- a/tests/regressiontests/mail/tests.py
+++ b/tests/regressiontests/mail/tests.py
@@ -101,6 +101,16 @@ BadHeaderError: Header values can't contain newlines (got u'Subject\nInjection T
>>> message['From']
'from@example.com'
+# Regression for #13259 - Make sure that headers are not changed
+# when calling EmailMessage.message()
+>>> email = EmailMessage('Subject', 'Content', 'bounce@example.com', ['to@example.com'], headers={'From': 'from@example.com'})
+>>> message = email.message()
+>>> message['From']
+'from@example.com'
+>>> message = email.message()
+>>> message['From']
+'from@example.com'
+
# Regression for #11144 - When a to/from/cc header contains unicode,
# make sure the email addresses are parsed correctly (especially
# with regards to commas)