def test_event_schema():
 options = ({}, None, {'event_data': {}}, {'event': 'state_changed', 'event_data': 1})
 for value in options:
  with pytest.raises(vol.MultipleInvalid):
   cv.EVENT_SCHEMA(value)
 options = ({'event': 'state_changed'}, {'event': 'state_changed', 'event_data': {'hello': 'world'}})
 for value in options:
  cv.EVENT_SCHEMA(value)

def test_event_schema ( ) : options = ( { } , None , { 'event_data' : { } } , { 'event' : 'state_changed' , 'event_data' : 1 } ) for value in options : with pytest . raises ( vol . MultipleInvalid ) : cv . EVENT_SCHEMA ( value ) options = ( { 'event' : 'state_changed' } , { 'event' : 'state_changed' , 'event_data' : { 'hello' : 'world' } } ) for value in options : cv . EVENT_SCHEMA ( value )
test event_schema validation .