Refs #23919 -- Removed misc Python 2/3 references.

This commit is contained in:
Tim Graham 2017-01-25 13:59:25 -05:00 committed by GitHub
parent 11856ea44e
commit 1c466994d9
22 changed files with 62 additions and 115 deletions

View file

@ -192,7 +192,6 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
'Content', 'from@example.com', ['to@example.com']
)
message = email.message()
# Note that in Python 3, maximum line length has increased from 76 to 78
self.assertEqual(
message['Subject'].encode(),
b'Long subject lines that get wrapped should contain a space continuation\n'
@ -1157,8 +1156,8 @@ class FakeSMTPServer(smtpd.SMTPServer, threading.Thread):
if mailfrom != maddr:
# According to the spec, mailfrom does not necessarily match the
# From header - on Python 3 this is the case where the local part
# isn't encoded, so try to correct that.
# From header - this is the case where the local part isn't
# encoded, so try to correct that.
lp, domain = mailfrom.split('@', 1)
lp = Header(lp, 'utf-8').encode()
mailfrom = '@'.join([lp, domain])