MCPcopy
hub / github.com/wechatpy/wechatpy / test_code_to_session

Method test_code_to_session

tests/test_client.py:910–916  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

908 self.assertEqual('ori_openid error', res[1]['err_msg'])
909
910 def test_code_to_session(self):
911 with HTTMock(wechat_api_mock):
912 res = self.client.wxa.code_to_session('023dUeGW1oeGOZ0JXvHW1SDVFW1dUeGu')
913 self.assertIn('session_key', res)
914 self.assertEqual('D1ZWEygStjuLCnZ9IN2l4Q==', res['session_key'])
915 self.assertEqual('o16wA0b4AZKzgVJR3MBwoUdTfU_E', res['openid'])
916 self.assertEqual('or4zX05h_Ykt4ju0TUfx3CQsvfTo', res['unionid'])

Callers

nothing calls this directly

Calls 1

code_to_sessionMethod · 0.80

Tested by

no test coverage detected