diff options
author | kalombo <nogamemorebrain@gmail.com> | 2017-04-07 17:54:50 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-04-07 18:01:31 -0400 |
commit | aedfe0ddd76fc37c83341c35c79ab63330ffded8 (patch) | |
tree | 42a4d83737e24c216f01cbdf346e2257bb2c38ce /tests/mail | |
parent | a354c69055fd818e612ce22eaa2da0576a4b89ee (diff) | |
download | django-aedfe0ddd76fc37c83341c35c79ab63330ffded8.tar.gz |
Tested EmailMessage(attachments=[MIMEText])
Diffstat (limited to 'tests/mail')
-rw-r--r-- | tests/mail/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 2527932997..05fe61026f 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -374,6 +374,12 @@ class MailTests(HeadersCheckMixin, SimpleTestCase): self.assertEqual(payload[0].get_content_type(), 'multipart/alternative') self.assertEqual(payload[1].get_content_type(), 'application/pdf') + def test_attachments_MIMEText(self): + txt = MIMEText('content1') + msg = EmailMessage(attachments=[txt]) + payload = msg.message().get_payload() + self.assertEqual(payload[0], txt) + def test_non_ascii_attachment_filename(self): """Regression test for #14964""" headers = {"Date": "Fri, 09 Nov 2001 01:08:47 -0000", "Message-ID": "foo"} |