Beispiel #1
0
    def test_base64decode_field_to_xml(self):
        from wechatpy.fields import Base64DecodeField

        content = to_text(base64.b64encode(b'test'))
        field = Base64DecodeField('Content')
        expected = '<Content><![CDATA[test]]></Content>'
        self.assertEqual(expected, field.to_xml(content))