Пример #1
0
def task_group_task_ui_to_app(ui_dict):
    """Converts TaskGroupTask ui dict to App entity."""
    return workflow_entity_factory.TaskGroupTaskFactory().create_empty(
        obj_id=ui_dict.get("obj_id"),
        title=ui_dict["title"],
        assignees=emails_to_app_people(ui_dict.get("assignees")),
        start_date=str_to_date(ui_dict["start_date"]),
        due_date=str_to_date(ui_dict["due_date"]))
Пример #2
0
 def test_create_task_group_task(self, app_workflow, app_task_group,
                                 app_person, selenium):
     """Test creation of Task Group Task."""
     task = workflow_entity_factory.TaskGroupTaskFactory().create(
         task_group=app_task_group, assignees=[app_person])
     workflow_ui_facade.create_task_group_task(task)
     actual_tasks = workflow_ui_facade.get_task_group_tasks_objs()
     test_utils.list_obj_assert(actual_tasks, [task])
Пример #3
0
def create_task_group_task(**attrs):
  """Creates TaskGroupTask via REST."""
  task_group_task = workflow_entity_factory.TaskGroupTaskFactory().create(
      **attrs)
  return workflow_rest_service.TaskGroupTaskRestService().create(
      task_group_task)