def test_get_emotes():
user_id = 1234
response = {
'emoticon_sets': {
'17937': [
{
'code': 'Kappa',
'id': 25
},
],
}
}
responses.add(responses.GET,
'%susers/%s/emotes' % (BASE_URL, user_id),
body=json.dumps(response),
status=200,
content_type='application/json')
client = TwitchClient('client id', 'oauth token')
emotes = client.users.get_emotes(user_id)
assert len(responses.calls) == 1
assert isinstance(emotes, dict)
assert emotes['17937'] == response['emoticon_sets']['17937']
评论列表
文章目录