Пример #1
0
 def test_send_event(self):
     job = TaskRequest(
         self.mytask.name, uuid(), [1], {'f': 'x'}, app=self.app,
     )
     job.eventer = MockEventDispatcher()
     job.send_event('task-frobulated')
     self.assertIn('task-frobulated', job.eventer.sent)
Пример #2
0
 def test_on_success_eventer(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {'f': 'x'}, app=self.app)
     tw.time_start = 1
     tw.eventer = Mock()
     tw.send_event = Mock()
     tw.on_success(42)
     self.assertTrue(tw.send_event.called)
Пример #3
0
 def test_on_success_eventer(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {"f": "x"})
     tw.time_start = 1
     tw.eventer = Mock()
     tw.send_event = Mock()
     tw.on_success(42)
     self.assertTrue(tw.send_event.called)
Пример #4
0
 def test_on_success_eventer(self):
     job = TaskRequest(self.mytask.name, uuid(), [1], {"f": "x"}, app=self.app)
     job.time_start = 1
     job.eventer = Mock()
     job.send_event = Mock()
     job.on_success(42)
     self.assertTrue(job.send_event.called)
Пример #5
0
 def test_send_event(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {"f": "x"})
     tw.eventer = MockEventDispatcher()
     tw.send_event("task-frobulated")
     self.assertIn("task-frobulated", tw.eventer.sent)
Пример #6
0
 def test_send_event(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {"f": "x"})
     tw.eventer = MockEventDispatcher()
     tw.send_event("task-frobulated")
     self.assertIn("task-frobulated", tw.eventer.sent)
Пример #7
0
 def test_send_event(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {'f': 'x'}, app=self.app)
     tw.eventer = MockEventDispatcher()
     tw.send_event('task-frobulated')
     self.assertIn('task-frobulated', tw.eventer.sent)
Пример #8
0
 def test_send_event(self):
     tw = TaskRequest(mytask.name, uuid(), [1], {'f': 'x'})
     tw.eventer = MockEventDispatcher()
     tw.send_event('task-frobulated')
     self.assertIn('task-frobulated', tw.eventer.sent)
Пример #9
0
 def test_send_event(self):
     job = TaskRequest(self.mytask.name, uuid(), [1], {"f": "x"}, app=self.app)
     job.eventer = MockEventDispatcher()
     job.send_event("task-frobulated")
     self.assertIn("task-frobulated", job.eventer.sent)