diff options
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) |