diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/mail/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/mail/tests.py b/tests/regressiontests/mail/tests.py index 3e9ae84650..33898cc1d5 100644 --- a/tests/regressiontests/mail/tests.py +++ b/tests/regressiontests/mail/tests.py @@ -498,6 +498,11 @@ class LocmemBackendTests(BaseEmailBackendTests, TestCase): connection2.send_messages([email]) self.assertEqual(len(mail.outbox), 2) + def test_validate_multiline_headers(self): + # Ticket #18861 - Validate emails when using the locmem backend + with self.assertRaises(BadHeaderError): + send_mail('Subject\nMultiline', 'Content', 'from@example.com', ['to@example.com']) + class FileBackendTests(BaseEmailBackendTests, TestCase): email_backend = 'django.core.mail.backends.filebased.EmailBackend' |
