MCPcopy
hub / github.com/wechatpy/wechatpy / test_base64decode_field_to_xml

Method test_base64decode_field_to_xml

tests/test_fields.py:167–173  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

165 self.assertEqual(expected, field.to_xml(content))
166
167 def test_base64decode_field_to_xml(self):
168 from wechatpy.fields import Base64DecodeField
169
170 content = to_text(base64.b64encode(b'test'))
171 field = Base64DecodeField('Content')
172 expected = '<Content><![CDATA[test]]></Content>'
173 self.assertEqual(expected, field.to_xml(content))
174
175 def test_datetime_field_to_xml(self):
176 from wechatpy.fields import DateTimeField

Callers

nothing calls this directly

Calls 3

to_textFunction · 0.90
Base64DecodeFieldClass · 0.90
to_xmlMethod · 0.45

Tested by

no test coverage detected