def add_event(self, event_yaml): event = YamlEvent(event_yaml) self._events.append(event) self.validate()
def test_valid_name(tag_created_yaml_obj): tag_created_yaml_obj['name'] = 'Foo bar' with assert_raises_validation_error('Foo bar is not a valid event name'): YamlEvent(tag_created_yaml_obj)