Ejemplo n.º 1
0
    def test_TaskSet_import_from_task_base(self):
        warnings.resetwarnings()

        with catch_warnings(record=True) as log:
            from celery.task.base import TaskSet, subtask
            TaskSet()
            subtask(PingTask)
            for w in (log[0].message, log[1].message):
                self.assertIsInstance(w, CDeprecationWarning)
                self.assertIn("is deprecated", w.args[0])
Ejemplo n.º 2
0
 def block(log):
     from celery.task.base import TaskSet, subtask
     TaskSet()
     subtask(PingTask)
     return log[0].message, log[1].message