[Python-checkins] CVS: python/dist/src/Lib/test test_email.py,1.9,1.10
Barry Warsaw
bwarsaw@users.sourceforge.net
Sun, 14 Oct 2001 21:39:09 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv32719/Lib/test
Modified Files:
test_email.py
Log Message:
test_typed_subpart_iterator_default_type(): Test for when the message
has no Content-Type: header, it should be treated as text/plain.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_email.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** test_email.py 2001/10/11 15:44:50 1.9
--- test_email.py 2001/10/15 04:39:02 1.10
***************
*** 887,890 ****
--- 887,908 ----
""")
+ def test_typed_subpart_iterator_default_type(self):
+ eq = self.assertEqual
+ msg = self._msgobj('msg_03.txt')
+ it = Iterators.typed_subpart_iterator(msg, 'text', 'plain')
+ lines = []
+ subparts = 0
+ for subpart in it:
+ subparts += 1
+ lines.append(subpart.get_payload())
+ eq(subparts, 1)
+ eq(EMPTYSTRING.join(lines), """\
+
+ Hi,
+
+ Do you like this message?
+
+ -Me
+ """)