Email header decoding with python2.5 needs space around encoded string

darcs-hash:20070502170556-86b55-5e11592c90a5a80c7fb1f32846dbd25f37263e6c.gz
This commit is contained in:
David Rousselie
2007-05-02 19:05:56 +02:00
parent d49da8d555
commit 5285a1e8d8
2 changed files with 5 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ if __name__ == '__main__':
# jmc_suite = unittest.TestSuite((mail_component_suite))
# jmc_suite = unittest.TestSuite()
# jmc_suite.addTest(MailAccount_TestCase('test_get_register_fields'))
# jmc_suite.addTest(MailAccount_TestCase('test_format_message_summary_partial_encoded'))
jmc_suite = unittest.TestSuite((lang_suite, \
mail_account_suite, \
imap_account_suite, \

View File

@@ -98,11 +98,11 @@ class MailAccount_TestCase(unittest.TestCase):
make_test((True, False, True), \
lambda self, email: \
email.replace_header("Subject", \
"\"" + str(email["Subject"]) \
+ "\" not encoded part") or \
"\" " + str(email["Subject"]) \
+ " \" not encoded part") or \
email.replace_header("From", \
"\"" + str(email["From"]) \
+ "\" not encoded part") or \
"\" " + str(email["From"]) \
+ " \" not encoded part") or \
self.account.format_message_summary(email), \
(u"From : \"encoded from (éàê)\" not encoded part\nSubject " + \
u": \"encoded subject (éàê)\" not encoded part\n\n", \