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)

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 )
test key_dependency validator .