test_chat.py 文件源码

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

项目:python-twitch-client 作者: tsifrer 项目源码 文件源码
def test_get_all_emoticons():
    response = {
        'emoticons': [example_emote]
    }
    responses.add(responses.GET,
                  '%schat/emoticons' % BASE_URL,
                  body=json.dumps(response),
                  status=200,
                  content_type='application/json')

    client = TwitchClient('client id')

    emoticon_sets = client.chat.get_all_emoticons()

    assert len(responses.calls) == 1
    assert isinstance(emoticon_sets, dict)
    assert emoticon_sets['emoticons'] == response['emoticons']
    assert emoticon_sets['emoticons'][0] == example_emote
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号