(self)
| 3920 | self.assertIsInstance(msg.get_payload(), str) |
| 3921 | |
| 3922 | def test_bytes_header_parser(self): |
| 3923 | eq = self.assertEqual |
| 3924 | # Parse only the headers of a complex multipart MIME document |
| 3925 | with openfile('msg_02.txt', 'rb') as fp: |
| 3926 | msg = email.parser.BytesHeaderParser().parse(fp) |
| 3927 | eq(msg['from'], 'ppp-request@zzz.org') |
| 3928 | eq(msg['to'], 'ppp@zzz.org') |
| 3929 | eq(msg.get_content_type(), 'multipart/mixed') |
| 3930 | self.assertFalse(msg.is_multipart()) |
| 3931 | self.assertIsInstance(msg.get_payload(), str) |
| 3932 | self.assertIsInstance(msg.get_payload(decode=True), bytes) |
| 3933 | |
| 3934 | def test_header_parser_multipart_is_valid(self): |
| 3935 | # Don't flag valid multipart emails as having defects |
nothing calls this directly
no test coverage detected