提交 85ae2732 编写于 作者: M Mikhail Korobov

Merge pull request #1715 from lopuhin/py3-test-mail

[MRG+1] py3: fix test_mail
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
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册