(self)
| 155 | assert expected in field.to_xml(articles) |
| 156 | |
| 157 | def test_base64encode_field_to_xml(self): |
| 158 | from wechatpy.fields import Base64EncodeField |
| 159 | |
| 160 | content = b'test' |
| 161 | field = Base64EncodeField('Content') |
| 162 | expected = '<Content><![CDATA[{content}]]></Content>'.format( |
| 163 | content=to_text(base64.b64encode(content)) |
| 164 | ) |
| 165 | self.assertEqual(expected, field.to_xml(content)) |
| 166 | |
| 167 | def test_base64decode_field_to_xml(self): |
| 168 | from wechatpy.fields import Base64DecodeField |
nothing calls this directly
no test coverage detected