(self)
| 3909 | class TestParsers(TestEmailBase): |
| 3910 | |
| 3911 | def test_header_parser(self): |
| 3912 | eq = self.assertEqual |
| 3913 | # Parse only the headers of a complex multipart MIME document |
| 3914 | with openfile('msg_02.txt', encoding="utf-8") as fp: |
| 3915 | msg = HeaderParser().parse(fp) |
| 3916 | eq(msg['from'], 'ppp-request@zzz.org') |
| 3917 | eq(msg['to'], 'ppp@zzz.org') |
| 3918 | eq(msg.get_content_type(), 'multipart/mixed') |
| 3919 | self.assertFalse(msg.is_multipart()) |
| 3920 | self.assertIsInstance(msg.get_payload(), str) |
| 3921 | |
| 3922 | def test_bytes_header_parser(self): |
| 3923 | eq = self.assertEqual |
nothing calls this directly
no test coverage detected