File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4445,12 +4445,17 @@ def testForwardedMessageAttachment(self):
44454445 def testStandardMsg (self ):
44464446 self .instance .config ['MAIL_DOMAIN' ] = 'example.com'
44474447 name = u'Accented chars \xe4 \xf6 \xfc \xc4 \xd6 \xdc \xdf '
4448- name = name .encode ('utf-8' )
4448+ # Python2 wants an UTF-8 string in first component of adr and content
4449+ # while Python3 wants a String
4450+ # It *may* be a bug that the subject can be Unicode in python2.
4451+ # But it doesn't hurt if the encoding happens to be utf-8
4452+ if sys .version_info [0 ] <= 2 :
4453+ name = name .encode ('utf-8' )
44494454 adr = 'someone@example.com'
44504455 to = [adr ]
44514456 adr = (name , adr )
44524457 mailer = roundupdb .Mailer (self .db .config )
4453- mailer .standard_message (to , name , name , author = adr )
4458+ mailer .standard_message (to , subject = name , content = name , author = adr )
44544459 assert os .path .exists (SENDMAILDEBUG )
44554460 self .compareMessages (self ._get_mail (),
44564461'''
You can’t perform that action at this time.
0 commit comments