def test_enum():
    'Test enum validator.'

    class TestEnum(enum.Enum):
        'Test enum.'
        value1 = 'Value 1'
        value2 = 'Value 2'
    schema = vol.Schema(cv.enum(TestEnum))
    with pytest.raises(vol.Invalid):
        schema('value3')
Test enum validator.
def test_enum():
    

    class TestEnum(enum.Enum):
        'Test enum.'
        value1 = 'Value 1'
        value2 = 'Value 2'
    schema = vol.Schema(cv.enum(TestEnum))
    with pytest.raises(vol.Invalid):
        schema('value3')