def test_notify_deployment(self, notify_checker): NailgunReceiver._notify(self.task, "done", "Test error.", "123", self.task.uuid) notify_checker.assert_called_with("done", u'Test error.', self.task.cluster_id, node_id="123", task_uuid=self.task.uuid)
def test_notify_provision_sub_task(self, notify_checker): sub_task = self.env.create_task(name=consts.TASK_NAMES.provision, status=consts.TASK_STATUSES.ready, cluster_id=self.cluster.id, parent_id=self.task.id) NailgunReceiver._notify(sub_task, "done", "Test error.", "123", sub_task.uuid) self.assertEqual(0, notify_checker.call_count)
def test_notify_deployment_sub_task(self, notify_checker): sub_task = self.env.create_task(name=consts.TASK_NAMES.deployment, status=consts.TASK_STATUSES.ready, cluster_id=self.cluster.id, parent_id=self.task.id) NailgunReceiver._notify(sub_task, "done", "Test error.", "123", sub_task.uuid) notify_checker.assert_called_with("done", u'Test error.', sub_task.cluster_id, node_id="123", task_uuid=sub_task.uuid)
def test_notify_deployment(self, notify_checker): NailgunReceiver._notify( self.task, "done", "Test error.", "123", self.task.uuid ) notify_checker.assert_called_with( "done", u'Test error.', self.task.cluster_id, node_id="123", task_uuid=self.task.uuid )
def test_notify_provision_sub_task(self, notify_checker): sub_task = self.env.create_task( name=consts.TASK_NAMES.provision, status=consts.TASK_STATUSES.ready, cluster_id=self.cluster.id, parent_id=self.task.id ) NailgunReceiver._notify( sub_task, "done", "Test error.", "123", sub_task.uuid ) self.assertEqual(0, notify_checker.call_count)
def test_notify_deployment_sub_task(self, notify_checker): sub_task = self.env.create_task( name=consts.TASK_NAMES.deployment, status=consts.TASK_STATUSES.ready, cluster_id=self.cluster.id, parent_id=self.task.id ) NailgunReceiver._notify( sub_task, "done", "Test error.", "123", sub_task.uuid ) notify_checker.assert_called_with( "done", u'Test error.', sub_task.cluster_id, node_id="123", task_uuid=sub_task.uuid )