EmailMultiAlternatives includes alternatives if the body is empty and it has attachments.
(self)
| 717 | ) |
| 718 | |
| 719 | def test_multipart_with_attachments(self): |
| 720 | """ |
| 721 | EmailMultiAlternatives includes alternatives if the body is empty and |
| 722 | it has attachments. |
| 723 | """ |
| 724 | msg = EmailMultiAlternatives(body="") |
| 725 | html_content = "<p>This is <strong>html</strong></p>" |
| 726 | msg.attach_alternative(html_content, "text/html") |
| 727 | msg.attach("example.txt", "Text file content", "text/plain") |
| 728 | self.assertIn(html_content, msg.message().as_string()) |
| 729 | |
| 730 | def test_alternatives(self): |
| 731 | msg = EmailMultiAlternatives() |
nothing calls this directly
no test coverage detected