'Test the input source service.'

def test_source_select(self):

    entity_id = 'media_player.lounge_room'
    assert setup_component(self.hass, mp.DOMAIN, {'media_player': {'platform': 'demo'}})
    state = self.hass.states.get(entity_id)
    assert ('dvd' == state.attributes.get('source'))
    mp.select_source(self.hass, None, entity_id)
    self.hass.block_till_done()
    state = self.hass.states.get(entity_id)
    assert ('dvd' == state.attributes.get('source'))
    mp.select_source(self.hass, 'xbox', entity_id)
    self.hass.block_till_done()
    state = self.hass.states.get(entity_id)
    assert ('xbox' == state.attributes.get('source'))
