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)

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 )
test slug validation .