[Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.55, 1.56 (original) (raw)
bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Tue May 11 18:22:02 EDT 2004
- Previous message: [Python-checkins] python/dist/src/Lib/email/test/data msg_36.txt, NONE, 1.1
- Next message: [Python-checkins] python/dist/src/Lib/email FeedParser.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvsroot/python/python/dist/src/Lib/email/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24978
Modified Files: test_email.py Log Message: More boiled down tests from Anthony's big torture suite.
Index: test_email.py
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** test_email.py 9 May 2004 18:03:36 -0000 1.55 --- test_email.py 11 May 2004 22:21:56 -0000 1.56
*** 1033,1038 ****
! # Test a more complicated multipart/mixed type message ! class TestMultipartMixed(TestEmailBase): def setUp(self): fp = openfile('PyBanner048.gif') --- 1033,1038 ----
! # Test complicated multipart/* messages ! class TestMultipart(TestEmailBase): def setUp(self): fp = openfile('PyBanner048.gif')
*** 1306,1309 **** --- 1306,1329 ---- ''')
def test_message_external_body(self):
eq = self.assertEqual
msg = self._msgobj('msg_36.txt')
eq(len(msg.get_payload()), 2)
msg1 = msg.get_payload(1)
eq(msg1.get_content_type(), 'multipart/alternative')
eq(len(msg1.get_payload()), 2)
for subpart in msg1.get_payload():
eq(subpart.get_content_type(), 'message/external-body')
eq(len(subpart.get_payload()), 1)
subsubpart = subpart.get_payload(0)
eq(subsubpart.get_content_type(), 'text/plain')
def test_double_boundary(self):
# msg_37.txt is a multipart that contains two dash-boundary's in a
# row. Our interpretation of RFC 2046 calls for ignoring the second
# and subsequent boundaries.
msg = self._msgobj('msg_37.txt')
self.assertEqual(len(msg.get_payload()), 3)
*** 1864,1867 **** --- 1884,1891 ---- self._idempotent(msg, text)
def test_message_external_body_idempotent(self):
msg, text = self._msgobj('msg_36.txt')
self._idempotent(msg, text)
def test_content_type(self): eq = self.assertEquals
- Previous message: [Python-checkins] python/dist/src/Lib/email/test/data msg_36.txt, NONE, 1.1
- Next message: [Python-checkins] python/dist/src/Lib/email FeedParser.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]