Exemple #1
0
 def __create_task_c(self):
     c = core.Task("task_c")
     c.add_execution_task(
         self.__execution_task,
         args="task_c",
         kwargs={"text": "task_b executed, running task_c"})
     return c
Exemple #2
0
 def __create_task_b(self):
     b = core.Task("task_b")
     b.add_execution_task(
         self.__execution_task,
         args="task_b",
         kwargs={"text": "task_a executed, running task_b"})
     return b
Exemple #3
0
 def test_task_placeholder_wrong(self):
     t = core.Task('test_placeholder',
                   task_function=self.__simple_task,
                   task_args=self.VAR)
     t.add_result_function(self.__result_with_place_holder, "foo_bar")
     t.run()
     check_result = t.check_result()
     assert check_result is False
Exemple #4
0
 def test_task_placeholder_2(self):
     t = core.Task('test_placeholder',
                   task_function=self.__simple_task,
                   task_args=self.VAR)
     t.add_result_function(self.__result_with_place_holder,
                           core.TaskResult())
     t.run()
     check_result = t.check_result()
     assert check_result
def create_task():
    def result_test(code_response):
        if code_response.status_code == 200:
            return True
        else:
            return False

    task = core.Task("example_request", request)
    task.add_result_function(result_test, task.result)
    return task
 def __create_request_task(self):
     t = core.Task("example_req", task_function=self.__request)
     return t
Exemple #7
0
 def __create_task_a(self):
     a = core.Task("task_a")
     a.add_execution_task(self.__execution_task, "task_a")
     return a