from unittest.mock import Mock


def mock_channel_file(
    offered_by, channel_id, playlist_id, create_user_list=False, user_list_title=None
):
    """Mock video channel github file"""

    content = f"""---
offered_by: {offered_by}
channel_id: {channel_id}
playlists:
  - id: {playlist_id}
    {"create_user_list: true" if create_user_list else "" }
    { "user_list_title: " + user_list_title if user_list_title else "" }
"""
    return Mock(decoded_content=content)