Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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
Exemple #4
0
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
Exemple #5
0
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
Exemple #6
0
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
Exemple #7
0
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
Exemple #8
0
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