def test_get_by_slug():
slug = 'OpenUglySnoodVoteNay'
responses.add(
responses.GET,
'%sclips/%s' % (BASE_URL, slug),
body=json.dumps(example_clip),
status=200,
content_type='application/json'
)
client = TwitchClient('client id')
clip = client.clips.get_by_slug(slug)
assert isinstance(clip, Clip)
assert clip.broadcast_id == example_clip['broadcast_id']
评论列表
文章目录