Commit 19c10caa authored by Barry Warsaw's avatar Barry Warsaw

Add tests for bug #478115, parsedate_tz() IndexError when a Date:

field exists with an empty value.
parent 4a106ee9
......@@ -937,6 +937,9 @@ class TestMiscellaneous(unittest.TestCase):
toff = time.timezone
self.assertEqual(offset, toff)
def test_parsedate(self):
self.assertEqual(Utils.parsedate(''), None)
# Test the iterator/generators
......
......@@ -117,6 +117,14 @@ class MessageTestCase(unittest.TestCase):
('', 'goit@lip.com'),
])
self.check(
'To: Some One <someone@dom.ain>\n'
'From: Anudder Persin <subuddy.else@dom.ain>\n'
'Date:\n'
'\n'
'test',
[('Some One', 'someone@dom.ain')])
self.check(
'To: person@dom.ain (User J. Person)\n\n',
[('User J. Person', 'person@dom.ain')])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment