def test_event_schema():
    'Test event_schema validation.'
    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.
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)