[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.38,1.39
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Mon, 10 Mar 2003 08:09:56 -0800
Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16003
Modified Files:
test_email.py
Log Message:
test_broken_base64_payload(): Test for crash in low-level binascii
module when decoding a message with broken base64.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** test_email.py 10 Mar 2003 15:11:29 -0000 1.38
--- test_email.py 10 Mar 2003 16:09:51 -0000 1.39
***************
*** 459,462 ****
--- 459,470 ----
self.assertRaises(KeyError, msg.replace_header, 'Fourth', 'Missing')
+ def test_broken_base64_payload(self):
+ x = 'AwDp0P7//y6LwKEAcPa/6Q=9'
+ msg = Message()
+ msg['content-type'] = 'audio/x-midi'
+ msg['content-transfer-encoding'] = 'base64'
+ msg.set_payload(x)
+ self.assertEqual(msg.get_payload(decode=True), x)
+