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

Method test_binary_base64_payload

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

Source from the content-addressed store, hash-verified

805 'get_payload returns wrong result with charset %s.' % charset)
806
807 def test_binary_base64_payload(self):
808 for charset in ('latin-1', 'ascii'):
809 msg = Message()
810 msg['content-type'] = 'text/plain; charset=%s' % charset
811 msg['content-transfer-encoding'] = 'base64'
812 msg.set_payload(b'Zm9v5paHYmFy')
813 self.assertEqual(
814 msg.get_payload(decode=True),
815 b'foo\xe6\x96\x87bar',
816 'get_payload returns wrong result with charset %s.' % charset)
817
818 def test_binary_uuencode_payload(self):
819 for charset in ('latin-1', 'ascii'):

Callers

nothing calls this directly

Calls 4

set_payloadMethod · 0.95
get_payloadMethod · 0.95
MessageClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected