test_channel_feed.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:python-twitch-client 作者: tsifrer 项目源码 文件源码
def test_delete_post():
    channel_id = '1234'
    post_id = example_post['id']
    responses.add(responses.DELETE,
                  '%sfeed/%s/posts/%s' % (BASE_URL, channel_id, post_id),
                  body=json.dumps(example_post),
                  status=200,
                  content_type='application/json')

    client = TwitchClient('client id', 'oauth token')

    post = client.channel_feed.delete_post(channel_id, post_id)

    assert len(responses.calls) == 1
    assert isinstance(post, Post)
    assert post.id == example_post['id']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号