Ejemplo n.º 1
0
 def test_build_pipeline_three(self):
     """
     Running a task with missing positional arguments for Writer class.
     :return:
     """
     args = "Test_APP ONE FOUR".split(" ")
     with self.assertRaises(TypeError):
         build_pipeline(args, False)
Ejemplo n.º 2
0
 def test_build_pipeline_eight(self):
     """
     Running a task with missing positional arguments for READER class.
     :return:
     """
     args = "Test_APP ONE SIX A B".split(" ")
     with self.assertRaises(TypeError):
         build_pipeline(args, False)
Ejemplo n.º 3
0
 def test_build_pipeline_two(self):
     """
     Running a task not in pre configured TASKS list.
     :return:
     """
     args = "Test_APP ONE TWO ABC".split(" ")
     with self.assertRaises(ValueError):
         build_pipeline(args, False)
Ejemplo n.º 4
0
 def test_build_pipeline_seven(self):
     """
     Running a task with proper positional arguments for PartitionWriter task class.
     :return:
     """
     args = "Test_APP SIX A B C".split(" ")
     task_list = build_pipeline(args, False)
     self.assertEqual(1, len(task_list))
Ejemplo n.º 5
0
 def test_build_pipeline_six(self):
     """
     Running a task with positional arguments for Reader task class.
     :return:
     """
     args = "Test_APP FIVE A B".split(" ")
     task_list = build_pipeline(args, False)
     self.assertEqual(1, len(task_list))
Ejemplo n.º 6
0
 def test_build_pipeline_nine(self):
     """
     Running a task with base Task class. Exception are thrown only while calling the execute().
     :return:
     """
     args = "Test_APP TASK".split(" ")
     task_list = build_pipeline(args, False)
     self.assertEqual(1, len(task_list))
Ejemplo n.º 7
0
 def test_build_pipeline_one(self):
     """
     Running custom tasks and checking the order of execution.
     :return:
     """
     args = "Test_APP ONE TWO THREE".split(" ")
     task_list = build_pipeline(args, False)
     self.assertEqual("Task One", task_list[0].execute())
     self.assertEqual("Task Two", task_list[1].execute())
     self.assertEqual("Task Three", task_list[2].execute())
     self.assertEqual(3, len(task_list))