Ejemplo n.º 1
0
    def test_run(self):
        task = Task(add_func, [1, 2])

        result = task.run()
        self.assertEqual(result, 3, msg="Result is not correct for the arguments provided")

        task2 = Task(data={"key": 3})

        with self.assertRaises(Exception):
            task2.run()
Ejemplo n.º 2
0
    def test_run(self):
        task = Task(add_func, [1, 2])

        result = task.run()
        self.assertEqual(result, 3, msg="Result is not correct for the arguments provided")

        task2 = Task(data={
            "key": 3
        })

        with self.assertRaises(Exception):
            task2.run()