'Setup things to be run when tests are started.'

def setUp(self):

    self.hass = get_test_home_assistant()
    self.mock_mp_1 = MockMediaPlayer(self.hass, 'mock1')
    self.mock_mp_1.schedule_update_ha_state()
    self.mock_mp_2 = MockMediaPlayer(self.hass, 'mock2')
    self.mock_mp_2.schedule_update_ha_state()
    self.hass.block_till_done()
    self.mock_mute_switch_id = switch.ENTITY_ID_FORMAT.format('mute')
    self.hass.states.set(self.mock_mute_switch_id, STATE_OFF)
    self.mock_state_switch_id = switch.ENTITY_ID_FORMAT.format('state')
    self.hass.states.set(self.mock_state_switch_id, STATE_OFF)
    self.mock_volume_id = input_slider.ENTITY_ID_FORMAT.format('volume_level')
    self.hass.states.set(self.mock_volume_id, 0)
    self.mock_source_list_id = input_select.ENTITY_ID_FORMAT.format('source_list')
    self.hass.states.set(self.mock_source_list_id, ['dvd', 'htpc'])
    self.mock_source_id = input_select.ENTITY_ID_FORMAT.format('source')
    self.hass.states.set(self.mock_source_id, 'dvd')
    self.mock_shuffle_switch_id = switch.ENTITY_ID_FORMAT.format('shuffle')
    self.hass.states.set(self.mock_shuffle_switch_id, STATE_OFF)
    self.config_children_only = {'name': 'test', 'platform': 'universal', 'children': [media_player.ENTITY_ID_FORMAT.format('mock1'), media_player.ENTITY_ID_FORMAT.format('mock2')]}
    self.config_children_and_attr = {'name': 'test', 'platform': 'universal', 'children': [media_player.ENTITY_ID_FORMAT.format('mock1'), media_player.ENTITY_ID_FORMAT.format('mock2')], 'attributes': {'is_volume_muted': self.mock_mute_switch_id, 'volume_level': self.mock_volume_id, 'source': self.mock_source_id, 'source_list': self.mock_source_list_id, 'state': self.mock_state_switch_id, 'shuffle': self.mock_shuffle_switch_id}}
