From 9704226ee4c933e1214e029d66005f1bee2fb766 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Sun, 24 Jan 2016 13:25:14 +0300 Subject: [PATCH 1/2] py3: fix test_mail - get_payload returns bytes when decode is True --- tests/test_mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_mail.py b/tests/test_mail.py index 58d44bdb3..25dd35099 100644 --- a/tests/test_mail.py +++ b/tests/test_mail.py @@ -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) From 860353b0c03fffb2fed44942b4389f92bd7f7c09 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Sun, 24 Jan 2016 13:27:41 +0300 Subject: [PATCH 2/2] py3: unskip test_mail and scrapy/mail.py --- tests/py3-ignores.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt index f189a4c86..70d3fb905 100644 --- a/tests/py3-ignores.txt +++ b/tests/py3-ignores.txt @@ -1,6 +1,5 @@ tests/test_exporters.py tests/test_linkextractors_deprecated.py -tests/test_mail.py tests/test_pipeline_files.py tests/test_pipeline_images.py tests/test_proxy_connect.py @@ -22,4 +21,3 @@ scrapy/linkextractors/htmlparser.py scrapy/downloadermiddlewares/cookies.py scrapy/extensions/statsmailer.py scrapy/extensions/memusage.py -scrapy/mail.py