From: Barry Warsaw Date: Sun, 9 May 2004 18:00:56 +0000 (+0000) Subject: test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. X-Git-Tag: v2.3.4c1~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fc2a79d0b0b67b5673d3f83a7773442e3cd37c4;p=thirdparty%2FPython%2Fcpython.git test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. --- diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 6854408e3534..5c1095921492 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1627,6 +1627,15 @@ message 2 --BOUNDARY-- ''') + def test_mime_attachments_in_constructor(self): + eq = self.assertEqual + text1 = MIMEText('') + text2 = MIMEText('') + msg = MIMEMultipart(_subparts=(text1, text2)) + eq(len(msg.get_payload()), 2) + eq(msg.get_payload(0), text1) + eq(msg.get_payload(1), text2) + # A general test of parser->model->generator idempotency. IOW, read a message