diff options
author | Barry Warsaw <barry@python.org> | 2004-05-09 18:03:36 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2004-05-09 18:03:36 (GMT) |
commit | bfe18c096fbd04cf32f629ebcce7a6b45b250fe7 (patch) | |
tree | 0466d565eb50aeeaa4983dafa995352e7fbc5d6e /Lib/email/test | |
parent | bb3ed7e3893de73bdae4f31ac9e932ba877d8779 (diff) | |
download | cpython-bfe18c096fbd04cf32f629ebcce7a6b45b250fe7.zip cpython-bfe18c096fbd04cf32f629ebcce7a6b45b250fe7.tar.gz cpython-bfe18c096fbd04cf32f629ebcce7a6b45b250fe7.tar.bz2 |
test_mime_attachments_in_constructor(): New test to check for SF bug # 884030.
Diffstat (limited to 'Lib/email/test')
-rw-r--r-- | Lib/email/test/test_email.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index e701d81..86c5cc9 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1750,6 +1750,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 |