summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-10-11 20:53:26 +0200
committerClaude Paroz <claude@2xlibre.net>2016-10-12 20:48:09 +0200
commit458e2fbfcc0a06d7d55ff5a1dcd79c91c64e8138 (patch)
tree9642f158595fd142f9e02464f68fc8f5c8d8ea63 /tests
parentbd7237d7ec5bb66add624a0cf31ac85f9aceadce (diff)
Fixed #27333 -- Prevented BASE64 encoding in message.as_string() on Python 3
Thanks Tim Graham for the review.
Diffstat (limited to 'tests')
-rw-r--r--tests/mail/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index bc0d8eabc9..662cd7c6d6 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -572,6 +572,8 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
)
s = msg.message().as_bytes()
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
+ s = msg.message().as_string()
+ self.assertIn(str('Content-Transfer-Encoding: 8bit'), s)
msg = EmailMessage(
'Subject', 'Body with non latin characters: А Б В Г Д Е Ж Ѕ З И І К Л М Н О П.', 'bounce@example.com',
@@ -579,6 +581,8 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
)
s = msg.message().as_bytes()
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
+ s = msg.message().as_string()
+ self.assertIn(str('Content-Transfer-Encoding: 8bit'), s)
def test_dont_base64_encode_message_rfc822(self):
# Ticket #18967