[Python-checkins]
python/dist/src/Lib/email/test test_email.py, 1.64, 1.65
bwarsaw at users.sourceforge.net
bwarsaw at users.sourceforge.net
Sat Nov 6 01:04:24 CET 2004
Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8911
Modified Files:
test_email.py
Log Message:
test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046
says boundaries may begin -- but not end -- with whitespace.
I will backport to Python 2.3.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- test_email.py 11 Oct 2004 13:53:08 -0000 1.64
+++ test_email.py 6 Nov 2004 00:04:20 -0000 1.65
@@ -1332,6 +1332,25 @@
----961284236552522269--
''')
+ def test_boundary_with_leading_space(self):
+ eq = self.assertEqual
+ msg = email.message_from_string('''\
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary=" XXXX"
+
+-- XXXX
+Content-Type: text/plain
+
+
+-- XXXX
+Content-Type: text/plain
+
+-- XXXX--
+''')
+ self.failUnless(msg.is_multipart())
+ eq(msg.get_boundary(), ' XXXX')
+ eq(len(msg.get_payload()), 2)
+
# Test some badly formatted messages
More information about the Python-checkins
mailing list