diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-06-04 16:15:34 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-06-04 16:15:34 (GMT) |
commit | 99147c40b5d67d875b5a383d2ed2f54c02da82de (patch) | |
tree | 1f37b9f345c0401df49a587a84f77202ea82a459 /Lib/email/test/test_email.py | |
parent | d3f1503f32453298db41c6803dba9d37e47e372d (diff) | |
download | cpython-99147c40b5d67d875b5a383d2ed2f54c02da82de.zip cpython-99147c40b5d67d875b5a383d2ed2f54c02da82de.tar.gz cpython-99147c40b5d67d875b5a383d2ed2f54c02da82de.tar.bz2 |
Merged revisions 81685 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81685 | r.david.murray | 2010-06-04 12:11:08 -0400 (Fri, 04 Jun 2010) | 4 lines
#4768: store base64 encoded email body parts as text, not binary.
Patch and tests by Forest Bond.
........
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r-- | Lib/email/test/test_email.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 5508456..395e200 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -966,7 +966,8 @@ class TestMIMEAudio(unittest.TestCase): def test_encoding(self): payload = self._au.get_payload() - self.assertEqual(base64.decodebytes(payload), self._audiodata) + self.assertEqual(base64.decodebytes(bytes(payload, 'ascii')), + self._audiodata) def test_checkSetMinor(self): au = MIMEAudio(self._audiodata, 'fish') @@ -1006,7 +1007,8 @@ class TestMIMEImage(unittest.TestCase): def test_encoding(self): payload = self._im.get_payload() - self.assertEqual(base64.decodebytes(payload), self._imgdata) + self.assertEqual(base64.decodebytes(bytes(payload, 'ascii')), + self._imgdata) def test_checkSetMinor(self): im = MIMEImage(self._imgdata, 'fish') @@ -1046,7 +1048,7 @@ class TestMIMEApplication(unittest.TestCase): eq = self.assertEqual bytes = b'\xfa\xfb\xfc\xfd\xfe\xff' msg = MIMEApplication(bytes) - eq(msg.get_payload(), b'+vv8/f7/') + eq(msg.get_payload(), '+vv8/f7/') eq(msg.get_payload(decode=True), bytes) |