(self)
| 216 | # XXX: there ought to be tests of the uniqueness of the boundary, too. |
| 217 | |
| 218 | def test_message_rfc822_only(self): |
| 219 | # Issue 7970: message/rfc822 not in multipart parsed by |
| 220 | # HeaderParser caused an exception when flattened. |
| 221 | with openfile('msg_46.txt', encoding="utf-8") as fp: |
| 222 | msgdata = fp.read() |
| 223 | parser = HeaderParser() |
| 224 | msg = parser.parsestr(msgdata) |
| 225 | out = StringIO() |
| 226 | gen = Generator(out, True, 0) |
| 227 | gen.flatten(msg, False) |
| 228 | self.assertEqual(out.getvalue(), msgdata) |
| 229 | |
| 230 | def test_byte_message_rfc822_only(self): |
| 231 | # Make sure new bytes header parser also passes this. |
nothing calls this directly
no test coverage detected