def test_icon():
 schema = vol.Schema(cv.icon)
 for value in (False, 'work', 'icon:work'):
  with pytest.raises(vol.MultipleInvalid):
   schema(value)
 schema('mdi:work')

def test_icon ( ) : schema = vol . Schema ( cv . icon ) for value in ( False , 'work' , 'icon:work' ) : with pytest . raises ( vol . MultipleInvalid ) : schema ( value ) schema ( 'mdi:work' )
test icon validation .