def test_slug():
    'Test slug validation.'
    schema = vol.Schema(cv.slug)
    for value in (None, 'hello world'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in (12345, 'hello'):
        schema(value)
Test slug validation.
def test_slug():
    
    schema = vol.Schema(cv.slug)
    for value in (None, 'hello world'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in (12345, 'hello'):
        schema(value)