示例#1
0
文件: test.py 项目: pasc/mailtree
    def test_add_multi_authors(self):
        mt = MailTree('abc@efg')
        mt.add_author('*****@*****.**')
        mt.add_author('*****@*****.**')
        mt.add_author('*****@*****.**')

        self.assertEqual(mt.authors, ['*****@*****.**', '*****@*****.**'])
示例#2
0
文件: test.py 项目: pasc/mailtree
    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ē <*****@*****.**>'])
示例#3
0
文件: test.py 项目: pasc/mailtree
    def test_add_author(self):
        mt = MailTree('abc@efg')
        mt.add_author('My Name Is <*****@*****.**>')

        self.assertEqual(mt.authors, ['My Name Is <*****@*****.**>'])