summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email/test_message.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_email/test_message.py')
-rw-r--r--Lib/test/test_email/test_message.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py
index 5dc46e1..fab97d9 100644
--- a/Lib/test/test_email/test_message.py
+++ b/Lib/test/test_email/test_message.py
@@ -929,6 +929,15 @@ class TestMIMEPart(TestEmailMessageBase, TestEmailBase):
m.set_content(content_manager=cm)
self.assertNotIn('MIME-Version', m)
+ def test_string_payload_with_multipart_content_type(self):
+ msg = message_from_string(textwrap.dedent("""\
+ Content-Type: multipart/mixed; charset="utf-8"
+
+ sample text
+ """), policy=policy.default)
+ attachments = msg.iter_attachments()
+ self.assertEqual(list(attachments), [])
+
if __name__ == '__main__':
unittest.main()