Exemple #1
0
 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 Entity.filter_objs_attrs(
       obj_or_objs=list_objs,
       attrs_to_include=self.entities_factory_cls().obj_attrs_names)
Exemple #2
0
 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 Entity.filter_objs_attrs(
       obj_or_objs=list_objs,
       attrs_to_include=self.entities_factory_cls().obj_attrs_names)
Exemple #3
0
 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 Entity.filter_objs_attrs(
       obj_or_objs=list_objs,
       attrs_to_include=self.entities_factory_cls().obj_attrs_names)
Exemple #4
0
 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 Entity.filter_objs_attrs(
       obj_or_objs=list_objs,
       attrs_to_include=self.entities_factory_cls().obj_attrs_names)