mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.6.x] Worked around a bug in python 3.3.3. Refs #21093
Backport of 280c1a65cc from master.
This commit is contained in:
@@ -460,7 +460,7 @@ class BaseEmailBackendTests(object):
|
||||
email = EmailMessage('Subject', 'Content', 'from@example.com', ['to@example.com'], cc=['cc@example.com'])
|
||||
mail.get_connection().send_messages([email])
|
||||
message = self.get_the_message()
|
||||
self.assertStartsWith(message.as_string(), 'Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nSubject: Subject\nFrom: from@example.com\nTo: to@example.com\nCc: cc@example.com\nDate: ')
|
||||
self.assertStartsWith(message.as_string(), 'MIME-Version: 1.0\nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: 7bit\nSubject: Subject\nFrom: from@example.com\nTo: to@example.com\nCc: cc@example.com\nDate: ')
|
||||
|
||||
def test_idn_send(self):
|
||||
"""
|
||||
@@ -618,7 +618,7 @@ class ConsoleBackendTests(BaseEmailBackendTests, TestCase):
|
||||
s = StringIO()
|
||||
connection = mail.get_connection('django.core.mail.backends.console.EmailBackend', stream=s)
|
||||
send_mail('Subject', 'Content', 'from@example.com', ['to@example.com'], connection=connection)
|
||||
self.assertTrue(s.getvalue().startswith('Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nSubject: Subject\nFrom: from@example.com\nTo: to@example.com\nDate: '))
|
||||
self.assertTrue(s.getvalue().startswith('MIME-Version: 1.0\nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: 7bit\nSubject: Subject\nFrom: from@example.com\nTo: to@example.com\nDate: '))
|
||||
|
||||
|
||||
class FakeSMTPServer(smtpd.SMTPServer, threading.Thread):
|
||||
|
||||
Reference in New Issue
Block a user