#NEWLINE# def test_config_options( self ) : #NEWLINE# #INDENT# 'Test configuration options.' #NEWLINE# count_start = len ( self . hass . states . entity_ids ( ) ) #NEWLINE# test_2_options = [ 'Good Option' , 'Better Option' , 'Best Option' ] #NEWLINE# self . assertTrue ( input_select . setup ( self . hass , { #NEWLINE# #INDENT# 'input_select' : { #NEWLINE# #INDENT# 'test_1' : { #NEWLINE# #INDENT# 'options' : [ 1 , 2 ] , #NEWLINE# #UNINDENT# } , #NEWLINE# 'test_2' : { #NEWLINE# #INDENT# 'name' : 'Hello World' , #NEWLINE# 'icon' : 'work' , #NEWLINE# 'options' : test_2_options , #NEWLINE# 'initial' : 'Better Option' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertEqual ( ( count_start + 2 ) , len ( self . hass . states . entity_ids ( ) ) ) #NEWLINE# state_1 = self . hass . states . get ( 'input_select.test_1' ) #NEWLINE# state_2 = self . hass . states . get ( 'input_select.test_2' ) #NEWLINE# self . assertIsNotNone ( state_1 ) #NEWLINE# self . assertIsNotNone ( state_2 ) #NEWLINE# self . assertEqual ( '1' , state_1 . state ) #NEWLINE# self . assertEqual ( [ '1' , '2' ] , state_1 . attributes . get ( input_select . ATTR_OPTIONS ) ) #NEWLINE# self . assertNotIn ( ATTR_ICON , state_1 . attributes ) #NEWLINE# self . assertNotIn ( ATTR_FRIENDLY_NAME , test_2_options . attributes ) #NEWLINE# self . assertEqual ( 'Better Option' , state_2 . state ) #NEWLINE# self . assertEqual ( test_2_options , state_2 . attributes . get ( input_select . ATTR_OPTIONS ) ) #NEWLINE# self . assertEqual ( 'Hello World' , state_2 . attributes . get ( ATTR_FRIENDLY_NAME ) ) #NEWLINE# self . assertEqual ( 'work' , state_2 . attributes . get ( ATTR_ICON ) )