(self)
| 727 | self.assertEqual(list(m.iter_parts()), []) |
| 728 | |
| 729 | def test_is_attachment(self): |
| 730 | m = self._make_message() |
| 731 | self.assertFalse(m.is_attachment()) |
| 732 | m['Content-Disposition'] = 'inline' |
| 733 | self.assertFalse(m.is_attachment()) |
| 734 | m.replace_header('Content-Disposition', 'attachment') |
| 735 | self.assertTrue(m.is_attachment()) |
| 736 | m.replace_header('Content-Disposition', 'AtTachMent') |
| 737 | self.assertTrue(m.is_attachment()) |
| 738 | m.set_param('filename', 'abc.png', 'Content-Disposition') |
| 739 | self.assertTrue(m.is_attachment()) |
| 740 | |
| 741 | def test_iter_attachments_mutation(self): |
| 742 | # We had a bug where iter_attachments was mutating the list. |
nothing calls this directly
no test coverage detected