def test_create_reaction_to_comment():
channel_id = '1234'
post_id = example_post['id']
comment_id = example_comment['id']
body = {
'created_at': '2016-12-02T04:26:47Z',
'emote_id': '1',
'id': '1341393b-e872-4554-9f6f-acd5f8b669fc',
'user': {}
}
url = '%sfeed/%s/posts/%s/comments/%s/reactions' % (BASE_URL, channel_id, post_id, comment_id)
responses.add(responses.POST,
url,
body=json.dumps(body),
status=200,
content_type='application/json')
client = TwitchClient('client id', 'oauth token')
response = client.channel_feed.create_reaction_to_comment(channel_id, post_id, comment_id, '1')
assert len(responses.calls) == 1
assert response['id']
评论列表
文章目录