예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #7
0
def update_control_rest(new_control_rest):
    """Update an existing Control object via REST API.
  Return: lib.entities.entity.Control
  """
    yield ControlsService().update(objs=new_control_rest)[0]
예제 #8
0
def battery_of_controls_rest(count=batch.BATTERY):
  """Creates batch of Controls via REST API"""
  service = ControlsService()
  yield service.create_controls(count=count)
예제 #9
0
def new_control_rest():
  """Creates Control via REST API"""
  service = ControlsService()
  yield service.create_controls(1)[0]
예제 #10
0
def delete_control_rest(new_control_rest):
    """Delete existing Control object via REST API.
  Return: lib.entities.entity.ControlEntity
  """
    yield ControlsService().delete_objs(objs=new_control_rest)
예제 #11
0
def update_control_rest(new_control_rest):
    """Update of the existing business object Control via REST API.
  Return the object: Control
  """
    yield ControlsService().update(objs=new_control_rest)[0]