def create_objs(self, count, factory_params=None, **attrs_for_template): """Create new objects via REST API and return list of created objects with filtered attributes. """ list_objs = self.create_list_objs( entity_factory=self.entities_factory_cls, count=count, attrs_to_factory=factory_params, **attrs_for_template) return Representation.filter_objs_attrs( objs=list_objs, attrs_to_include=Representation.all_attrs_names())
def update_objs(self, objs, factory_params=None, **attrs_for_template): """Update existing objects via REST API and return list of updated objects with filtered attributes. """ list_objs = self.update_list_objs( entity_factory=self.entities_factory_cls, list_objs_to_update=help_utils.convert_to_list(objs), attrs_to_factory=factory_params, **attrs_for_template) return Representation.filter_objs_attrs( objs=list_objs, attrs_to_include=Representation.all_attrs_names())