def test_key_dependency():
    schema = vol.Schema(cv.key_dependency('beer', 'soda'))

    for value in (
        {'beer': None}
    ):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)

    for value in (
        {'beer': None, 'soda': None},
        {'soda': None}, {}
    ):
        schema(value)
Test key_dependency validator.
dataset/ETHPy150Open home-assistant/home-assistant/tests/helpers/test_config_validation.py/test_key_dependency