Example #1
0
 def test_default_kwargs(self):
     tid = uuid()
     tw = TaskRequest(mytask.name, tid, [4], {"f": "x"})
     self.assertDictEqual(
             tw.extend_with_default_kwargs(10, "some_logfile"), {
                 "f": "x",
                 "logfile": "some_logfile",
                 "loglevel": 10,
                 "task_id": tw.id,
                 "task_retries": 0,
                 "task_is_eager": False,
                 "delivery_info": {"exchange": None, "routing_key": None},
                 "task_name": tw.name})
Example #2
0
 def test_default_kwargs(self):
     tid = gen_unique_id()
     tw = TaskRequest(mytask.name, tid, [4], {"f": "x"})
     self.assertDictEqual(
             tw.extend_with_default_kwargs(10, "some_logfile"), {
                 "f": "x",
                 "logfile": "some_logfile",
                 "loglevel": 10,
                 "task_id": tw.task_id,
                 "task_retries": 0,
                 "task_is_eager": False,
                 "delivery_info": {},
                 "task_name": tw.task_name})
 def test_default_kwargs(self):
     tid = uuid()
     tw = TaskRequest(mytask.name, tid, [4], {"f": "x"})
     self.assertDictEqual(
             tw.extend_with_default_kwargs(10, "some_logfile"), {
                 "f": "x",
                 "logfile": "some_logfile",
                 "loglevel": 10,
                 "task_id": tw.task_id,
                 "task_retries": 0,
                 "task_is_eager": False,
                 "delivery_info": {},
                 "task_name": tw.task_name})
Example #4
0
 def test_default_kwargs(self):
     tid = uuid()
     tw = TaskRequest(mytask.name, tid, [4], {'f': 'x'})
     self.assertDictEqual(
             tw.extend_with_default_kwargs(), {
                 'f': 'x',
                 'logfile': None,
                 'loglevel': None,
                 'task_id': tw.id,
                 'task_retries': 0,
                 'task_is_eager': False,
                 'delivery_info': {'exchange': None, 'routing_key': None},
                 'task_name': tw.name})
Example #5
0
 def test_default_kwargs(self):
     tid = uuid()
     tw = TaskRequest(mytask.name, tid, [4], {'f': 'x'})
     self.assertDictEqual(
             tw.extend_with_default_kwargs(), {
                 'f': 'x',
                 'logfile': None,
                 'loglevel': None,
                 'task_id': tw.id,
                 'task_retries': 0,
                 'task_is_eager': False,
                 'delivery_info': {'exchange': None, 'routing_key': None},
                 'task_name': tw.name})
Example #6
0
 def test_default_kwargs(self):
     tid = uuid()
     job = TaskRequest(self.mytask.name, tid, [4], {"f": "x"}, app=self.app)
     self.assertDictEqual(
         job.extend_with_default_kwargs(),
         {
             "f": "x",
             "logfile": None,
             "loglevel": None,
             "task_id": job.id,
             "task_retries": 0,
             "task_is_eager": False,
             "delivery_info": {"exchange": None, "routing_key": None, "priority": None, "redelivered": None},
             "task_name": job.name,
         },
     )
Example #7
0
 def test_default_kwargs(self):
     tid = uuid()
     job = TaskRequest(self.mytask.name, tid, [4], {'f': 'x'}, app=self.app)
     self.assertDictEqual(
         job.extend_with_default_kwargs(), {
             'f': 'x',
             'logfile': None,
             'loglevel': None,
             'task_id': job.id,
             'task_retries': 0,
             'task_is_eager': False,
             'delivery_info': {
                 'exchange': None,
                 'routing_key': None,
                 'priority': None,
             },
             'task_name': job.name})
Example #8
0
 def test_default_kwargs(self):
     tid = uuid()
     tw = TaskRequest(mytask.name, tid, [4], {"f": "x"})
     self.assertDictEqual(
         tw.extend_with_default_kwargs(), {
             "f": "x",
             "logfile": None,
             "loglevel": None,
             "task_id": tw.id,
             "task_retries": 0,
             "task_is_eager": False,
             "delivery_info": {
                 "exchange": None,
                 "routing_key": None
             },
             "task_name": tw.name
         })