MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_utf8_input

Method test_utf8_input

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

Source from the content-addressed store, hash-verified

1831 self.assertIn('hello there', msg.as_string())
1832
1833 def test_utf8_input(self):
1834 teststr = '\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'
1835 eq = self.assertEqual
1836 msg = MIMEText(teststr, _charset='utf-8')
1837 eq(msg.get_charset().output_charset, 'utf-8')
1838 eq(msg['content-type'], 'text/plain; charset="utf-8"')
1839 eq(msg.get_payload(decode=True), teststr.encode('utf-8'))
1840
1841 @unittest.skip("can't fix because of backward compat in email5, "
1842 "will fix in email6")

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected