1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #18861 -- Triggered message validation with locmem email backend

Thanks Bruno Renié for the report and the initial patch.
This commit is contained in:
Claude Paroz
2012-09-22 15:17:13 +02:00
parent 0ab8c58ca8
commit 8599f64e54
2 changed files with 7 additions and 0 deletions

View File

@@ -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'