MCPcopy Index your code
hub / github.com/python/cpython / test_utf8_input

Method test_utf8_input

Lib/test/test_email/test_email.py:1855–1861  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1853 self.assertIn('hello there', msg.as_string())
1854
1855 def test_utf8_input(self):
1856 teststr = '\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'
1857 eq = self.assertEqual
1858 msg = MIMEText(teststr, _charset='utf-8')
1859 eq(msg.get_charset().output_charset, 'utf-8')
1860 eq(msg['content-type'], 'text/plain; charset="utf-8"')
1861 eq(msg.get_payload(decode=True), teststr.encode('utf-8'))
1862
1863 @unittest.skip("can't fix because of backward compat in email5, "
1864 "will fix in email6")

Callers

nothing calls this directly

Calls 5

MIMETextClass · 0.90
eqFunction · 0.85
get_charsetMethod · 0.80
get_payloadMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected