def test_add_multi_authors(self): mt = MailTree('abc@efg') mt.add_author('*****@*****.**') mt.add_author('*****@*****.**') mt.add_author('*****@*****.**') self.assertEqual(mt.authors, ['*****@*****.**', '*****@*****.**'])
def test_add_encoded_author(self): mt = MailTree('abc@efg') mt.add_author('=?utf-8?b?xZrDtsacxJMgxYXEg23EkyA8bmFtZUBleGFtcGxlLmNvbT4=?=') mt.add_author('=?utf-8?b?xZrDtsacxJMgxYXEg23EkyA8bmFtZUBleGFtcGxlLmNvbT4=?=') self.assertEqual(mt.authors, [u'ŚöƜē Ņămē <*****@*****.**>'])
def test_add_author(self): mt = MailTree('abc@efg') mt.add_author('My Name Is <*****@*****.**>') self.assertEqual(mt.authors, ['My Name Is <*****@*****.**>'])