def test_string():
    schema = vol.Schema(cv.string)

    with pytest.raises(vol.MultipleInvalid):
        schema(None)

    for value in (True, 1, 'hello'):
        schema(value)
Test string validation.
dataset/ETHPy150Open home-assistant/home-assistant/tests/helpers/test_config_validation.py/test_string