def test_create_reaction_to_post():
channel_id = '1234'
post_id = example_post['id']
response = {
'id': '24989127',
'emote_id': '25',
'user': {},
'created_at': '2016-11-29T15:51:12Z',
}
responses.add(responses.POST,
'%sfeed/%s/posts/%s/reactions' % (BASE_URL, channel_id, post_id),
body=json.dumps(response),
status=200,
content_type='application/json')
client = TwitchClient('client id', 'oauth token')
response = client.channel_feed.create_reaction_to_post(
channel_id, post_id, response['emote_id'])
assert len(responses.calls) == 1
assert response['id']
评论列表
文章目录