def test_check_follows_channel():
user_id = 1234
channel_id = 12345
responses.add(responses.GET,
'%susers/%s/follows/channels/%s' % (BASE_URL, user_id, channel_id),
body=json.dumps(example_follow),
status=200,
content_type='application/json')
client = TwitchClient('client id')
follow = client.users.check_follows_channel(user_id, channel_id)
assert len(responses.calls) == 1
assert isinstance(follow, Follow)
assert follow.notifications == example_follow['notifications']
assert isinstance(follow.channel, Channel)
assert follow.channel.id == example_channel['_id']
assert follow.channel.name == example_channel['name']
评论列表
文章目录