def new_controls_rest(): """Create a new Controls objects via REST API. Return: [lib.entities.entity.Control, ...]. """ controls = ControlsService().create(count=batch.COUNT) ObjectsOwnersService().create(objs=controls) yield controls
def new_controls_rest(): """Create new Controls objects via REST API. Return: [lib.entities.entity.ControlEntity, ...] """ controls = ControlsService().create_objs(count=batch.COUNT) ObjectsOwnersService().assign_owner_to_objs(objs=controls) yield controls
def new_control_rest(): """Create a new Control object via REST API. Return: lib.entities.entity.Control """ control = ControlsService().create(count=1)[0] ObjectsOwnersService().create(objs=control) yield control
def new_control_rest(): """Create new Control object via REST API. Return: lib.entities.entity.ControlEntity """ control = ControlsService().create_objs(count=1)[0] ObjectsOwnersService().assign_owner_to_objs(objs=control) yield control
def new_controls_rest(): """Create batch of a new business objects Controls via REST API. Return the list of objects: [Control#1, Control#2, Control#3]. """ controls = ControlsService().create(count=batch.BATTERY) ObjectsOwnersService().create(objs=controls) yield controls
def new_control_rest(): """Create a new business object Control via REST API. Return the object: Control """ control = ControlsService().create(count=1)[0] ObjectsOwnersService().create(objs=control) yield control
def new_issue_rest(new_audit_rest): """Create new Program, Audit, Issue objects via REST API. Return: (lib.entities.entity.Issue, lib.entities.entity.Audit, lib.entities.entity.Program) """ issue = (IssuesService().create(count=1, audit=new_audit_rest[0])[0], new_audit_rest[0], new_audit_rest[1]) ObjectsOwnersService().create(objs=issue[0]) yield issue
def new_issue_rest(new_audit_rest): """Create new Program, Audit, Issue objects via REST API. Return: (lib.entities.entity.IssueEntity, lib.entities.entity.AuditEntity, lib.entities.entity.ProgramEntity) """ issue = (IssuesService().create_objs(count=1, audit=new_audit_rest[0].__dict__)[0], new_audit_rest[0], new_audit_rest[1]) ObjectsOwnersService().assign_owner_to_objs(objs=issue[0]) yield issue