Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b404bb7

Browse files
committed
test_three_lines(): Test case reported by Andrew McNamara. Works in
email 2.2 but fails in email 1.0.
1 parent bc46510 commit b404bb7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/email/test/test_email.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,14 @@ def test_multipart_digest_with_extra_mime_headers(self):
17401740
eq(part2a.get_type(), 'text/plain')
17411741
neq(part2a.get_payload(), 'message 2\n')
17421742

1743+
def test_three_lines(self):
1744+
# A bug report by Andrew McNamara
1745+
lines = ['From: Andrew Person <[email protected]',
1746+
'Subject: Test',
1747+
'Date: Tue, 20 Aug 2002 16:43:45 +1000']
1748+
msg = email.message_from_string(NL.join(lines))
1749+
self.assertEqual(msg['date'], 'Tue, 20 Aug 2002 16:43:45 +1000')
1750+
17431751

17441752

17451753
class TestBase64(unittest.TestCase):

0 commit comments

Comments
 (0)