MCPcopy
hub / github.com/scrapy/scrapy / test_send_html

Method test_send_html

tests/test_mail.py:51–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 )
50
51 def test_send_html(self):
52 mailsender = MailSender(debug=True)
53 mailsender.send(
54 to=["test@scrapy.org"],
55 subject="subject",
56 body="<p>body</p>",
57 mimetype="text/html",
58 _callback=self._catch_mail_sent,
59 )
60
61 msg = self.catched_msg["msg"]
62 assert msg.get_payload() == "<p>body</p>"
63 assert msg.get("Content-Type") == "text/html"
64
65 def test_send_attach(self):
66 attach = BytesIO()

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
MailSenderClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected