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