def test_delete_post_comment():
channel_id = '1234'
post_id = example_post['id']
comment_id = example_comment['id']
responses.add(responses.DELETE,
'%sfeed/%s/posts/%s/comments/%s' % (BASE_URL, channel_id, post_id, comment_id),
body=json.dumps(example_comment),
status=200,
content_type='application/json')
client = TwitchClient('client id', 'oauth token')
comment = client.channel_feed.delete_post_comment(channel_id, post_id, comment_id)
assert len(responses.calls) == 1
assert isinstance(comment, Comment)
assert comment.id == example_comment['id']
评论列表
文章目录