(self)
| 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() |
nothing calls this directly
no test coverage detected