1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 16:03:49 +00:00

py3: fix test_mail - get_payload returns bytes when decode is True

This commit is contained in:
Konstantin Lopuhin 2016-01-24 13:25:14 +03:00
parent c75f7ed20b
commit 9704226ee4

View File

@ -53,8 +53,8 @@ class MailSenderTest(unittest.TestCase):
self.assertEqual(len(payload), 2)
text, attach = payload
self.assertEqual(text.get_payload(decode=True), 'body')
self.assertEqual(attach.get_payload(decode=True), 'content')
self.assertEqual(text.get_payload(decode=True), b'body')
self.assertEqual(attach.get_payload(decode=True), b'content')
def _catch_mail_sent(self, **kwargs):
self.catched_msg = dict(**kwargs)