(self)
| 728 | self.assertIn(html_content, msg.message().as_string()) |
| 729 | |
| 730 | def test_alternatives(self): |
| 731 | msg = EmailMultiAlternatives() |
| 732 | html_content = "<p>This is <strong>html</strong></p>" |
| 733 | mime_type = "text/html" |
| 734 | msg.attach_alternative(html_content, mime_type) |
| 735 | |
| 736 | self.assertIsInstance(msg.alternatives[0], EmailAlternative) |
| 737 | |
| 738 | self.assertEqual(msg.alternatives[0][0], html_content) |
| 739 | self.assertEqual(msg.alternatives[0].content, html_content) |
| 740 | |
| 741 | self.assertEqual(msg.alternatives[0][1], mime_type) |
| 742 | self.assertEqual(msg.alternatives[0].mimetype, mime_type) |
| 743 | |
| 744 | self.assertIn(html_content, msg.message().as_string()) |
| 745 | |
| 746 | def test_alternatives_constructor(self): |
| 747 | html_content = "<p>This is <strong>html</strong></p>" |
nothing calls this directly
no test coverage detected