def input_sources_fixture() -> Sequence[InputSource]: """Create a set of input sources for testing.""" source = Mock(InputSource, autospec=True) source.player_id = 1 source.input_name = const.INPUT_AUX_IN_1 source.name = "HEOS Drive - Line In 1" return [source]
def player_fixture(dispatcher): """Create a mock HeosPlayer.""" player = Mock(HeosPlayer, autospec=True) player.heos.dispatcher = dispatcher player.player_id = 1 player.name = "Test Player" player.model = "Test Model" player.version = "1.0.0" player.is_muted = False player.available = True player.state = const.PLAY_STATE_STOP player.ip_address = "127.0.0.1" player.network = "wired" player.shuffle = False player.repeat = const.REPEAT_OFF player.volume = 25 player.now_playing_media.supported_controls = const.CONTROLS_ALL player.now_playing_media.album_id = 1 player.now_playing_media.queue_id = 1 player.now_playing_media.source_id = 1 player.now_playing_media.station = "Station Name" player.now_playing_media.type = "Station" player.now_playing_media.album = "Album" player.now_playing_media.artist = "Artist" player.now_playing_media.media_id = "1" player.now_playing_media.duration = None player.now_playing_media.current_position = None player.now_playing_media.image_url = "http://" player.now_playing_media.song = "Song" return {player.player_id: player}