(self)
| 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>" |
| 748 | mime_type = "text/html" |
| 749 | |
| 750 | msg = EmailMultiAlternatives( |
| 751 | alternatives=[EmailAlternative(html_content, mime_type)] |
| 752 | ) |
| 753 | |
| 754 | self.assertIsInstance(msg.alternatives[0], EmailAlternative) |
| 755 | |
| 756 | self.assertEqual(msg.alternatives[0][0], html_content) |
| 757 | self.assertEqual(msg.alternatives[0].content, html_content) |
| 758 | |
| 759 | self.assertEqual(msg.alternatives[0][1], mime_type) |
| 760 | self.assertEqual(msg.alternatives[0].mimetype, mime_type) |
| 761 | |
| 762 | self.assertIn(html_content, msg.message().as_string()) |
| 763 | |
| 764 | def test_alternatives_constructor_from_tuple(self): |
| 765 | html_content = "<p>This is <strong>html</strong></p>" |
nothing calls this directly
no test coverage detected