def test_key_dependency():
    'Test key_dependency validator.'
    schema = vol.Schema(cv.key_dependency('beer', 'soda'))
    options = {'beer': None}
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    options = ({'beer': None, 'soda': None}, {'soda': None}, {})
    for value in options:
        schema(value)
Test key_dependency validator.
def test_key_dependency():
    
    schema = vol.Schema(cv.key_dependency('beer', 'soda'))
    options = {'beer': None}
    for value in options:
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    options = ({'beer': None, 'soda': None}, {'soda': None}, {})
    for value in options:
        schema(value)