#NEWLINE# def test_state_with_children_and_attrs( self ) : #NEWLINE# #INDENT# 'Test media player with children and master state.' #NEWLINE# config = self . config_children_and_attr #NEWLINE# universal . validate_config ( config ) #NEWLINE# ump = universal . UniversalMediaPlayer ( ump . hass , ** config ) #NEWLINE# ump . entity_id = media_player . ENTITY_ID_FORMAT . format ( config [ 'name' ] ) #NEWLINE# ump . update ( ) #NEWLINE# self . assertEqual ( STATE_OFF , ump . state ) #NEWLINE# self . hass . states . set ( self . mock_state_switch_id , STATE_ON ) #NEWLINE# ump . update ( ) #NEWLINE# self . assertEqual ( STATE_ON , ump . state ) #NEWLINE# self . mock_mp_1 . _state = STATE_PLAYING #NEWLINE# self . mock_mp_1 . update_ha_state ( ) #NEWLINE# ump . update ( ) #NEWLINE# self . assertEqual ( STATE_PLAYING , ump . state ) #NEWLINE# self . hass . states . set ( self . mock_state_switch_id , STATE_OFF ) #NEWLINE# ump . update ( ) #NEWLINE# self . assertEqual ( STATE_OFF , ump . state )