summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-09-08 19:42:11 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-09-08 19:42:11 +0300
commitd8b7770a0e4a79280a3b5346ae8a6593ea74facf (patch)
tree40f3ddd8432831e37b967a3c6ad67732bb5f01c8 /Lib/test
parentcc854499e40483d408d68201f1e6d6ae936ae13a (diff)
parent2b2a9be9135be0135649a2a869856dbe4cc543f1 (diff)
downloadcpython-git-d8b7770a0e4a79280a3b5346ae8a6593ea74facf.tar.gz
Issue #27445: Merge from 3.5
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_email.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index 30ea77f208..529d3ef0e3 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -1653,9 +1653,12 @@ class TestMIMEText(unittest.TestCase):
eq(msg.get_charset().input_charset, 'us-ascii')
eq(msg['content-type'], 'text/plain; charset="us-ascii"')
# Also accept a Charset instance
- msg = MIMEText('hello there', _charset=Charset('utf-8'))
+ charset = Charset('utf-8')
+ charset.body_encoding = None
+ msg = MIMEText('hello there', _charset=charset)
eq(msg.get_charset().input_charset, 'utf-8')
eq(msg['content-type'], 'text/plain; charset="utf-8"')
+ eq(msg.get_payload(), 'hello there')
def test_7bit_input(self):
eq = self.assertEqual