MCPcopy Create free account
hub / github.com/doraemonext/wechat-python-sdk / test_response_voice

Method test_response_voice

tests/test_basic.py:541–551  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

539 self.assertEqual(resp['xml']['Image']['MediaId'], 'xurkvi9gl')
540
541 def test_response_voice(self):
542 wechat = WechatBasic()
543 wechat.parse_data(data=self.test_message)
544
545 resp_xml = wechat.response_voice(media_id='xurkvi9gl')
546 resp = xmltodict.parse(resp_xml)
547
548 self.assertEqual(resp['xml']['ToUserName'], 'fromUser')
549 self.assertEqual(resp['xml']['FromUserName'], 'toUser')
550 self.assertEqual(resp['xml']['MsgType'], 'voice')
551 self.assertEqual(resp['xml']['Voice']['MediaId'], 'xurkvi9gl')
552
553 def test_response_video(self):
554 wechat = WechatBasic()

Callers

nothing calls this directly

Calls 3

parse_dataMethod · 0.95
response_voiceMethod · 0.95
WechatBasicClass · 0.90

Tested by

no test coverage detected