diff options
| author | Senthil Kumaran <senthil@uthcode.com> | 2012-07-23 02:32:17 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <senthil@uthcode.com> | 2012-07-23 02:32:17 (GMT) |
| commit | 392bfd30af8cf87801c724d5964f4b5b088b025d (patch) | |
| tree | 6f1599939611894a9a3f9e4c4b53938c8d56b9ea /Lib/test/test_email/test_email.py | |
| parent | d74062948d890ca787721dbefd3ab8caf518c554 (diff) | |
| parent | 970bef295d390c5ceaedca0f095590cd381a3331 (diff) | |
| download | cpython-392bfd30af8cf87801c724d5964f4b5b088b025d.zip cpython-392bfd30af8cf87801c724d5964f4b5b088b025d.tar.gz cpython-392bfd30af8cf87801c724d5964f4b5b088b025d.tar.bz2 | |
merge heads.
Diffstat (limited to 'Lib/test/test_email/test_email.py')
| -rw-r--r-- | Lib/test/test_email/test_email.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 003df96..1c3775f 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -1283,6 +1283,28 @@ From the desk of A.A.A.: Blah blah blah """) + def test_mangle_from_in_preamble_and_epilog(self): + s = StringIO() + g = Generator(s, mangle_from_=True) + msg = email.message_from_string(textwrap.dedent("""\ + From: foo@bar.com + Mime-Version: 1.0 + Content-Type: multipart/mixed; boundary=XXX + + From somewhere unknown + + --XXX + Content-Type: text/plain + + foo + + --XXX-- + + From somewhere unknowable + """)) + g.flatten(msg) + self.assertEqual(len([1 for x in s.getvalue().split('\n') + if x.startswith('>From ')]), 2) # Test the basic MIMEAudio class |
