test_parseaddr_empty(): New test for assuring that

Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty
string.  Built on rfc822, this used to return None.
This commit is contained in:
Barry Warsaw 2001-12-20 16:37:27 +00:00
parent 5e08d10dd9
commit eae36ac5c3
1 changed files with 4 additions and 0 deletions

View File

@ -952,6 +952,10 @@ class TestMiscellaneous(unittest.TestCase):
def test_parsedate_none(self):
self.assertEqual(Utils.parsedate(''), None)
def test_parseaddr_empty(self):
self.assertEqual(Utils.parseaddr('<>'), ('', ''))
self.assertEqual(Utils.dump_address_pair(Utils.parseaddr('<>')), '')
# Test the iterator/generators