(self)
| 308 | self.assertEqual(text, NL.join(lines[1:])) |
| 309 | |
| 310 | def test_as_string_policy(self): |
| 311 | msg = self._msgobj('msg_01.txt') |
| 312 | newpolicy = msg.policy.clone(linesep='\r\n') |
| 313 | fullrepr = msg.as_string(policy=newpolicy) |
| 314 | s = StringIO() |
| 315 | g = Generator(s, policy=newpolicy) |
| 316 | g.flatten(msg) |
| 317 | self.assertEqual(fullrepr, s.getvalue()) |
| 318 | |
| 319 | def test_nonascii_as_string_without_cte(self): |
| 320 | m = textwrap.dedent("""\ |