]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_mime_attachments_in_constructor(): New test to check for SF bug # 884030.
authorBarry Warsaw <barry@python.org>
Sun, 9 May 2004 18:00:56 +0000 (18:00 +0000)
committerBarry Warsaw <barry@python.org>
Sun, 9 May 2004 18:00:56 +0000 (18:00 +0000)
Lib/email/test/test_email.py

index 6854408e3534c9bb31d969ed6c6caf081676db9e..5c10959214923827950d6439b3d830a521385441 100644 (file)
@@ -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)
+
 
 \f
 # A general test of parser->model->generator idempotency.  IOW, read a message