def test_run_action_failed(self): error = self.task.node.submit_command.side_effect = node.Error("Oops") assert not serviceinstance.run_action(self.task, self.action) self.task.notify.assert_called_with(self.failed) self.task.buffer_store.open.return_value.write.assert_called_with( "Node run failure for mock_task: %s" % str(error) )
def test_run_action_failed(self): error = self.task.node.submit_command.side_effect = node.Error("Oops") assert not serviceinstance.run_action(self.task, self.action) self.task.notify.assert_called_with(self.failed) self.task.buffer_store.open.return_value.write.assert_called_with( "Node run failure for mock_task: %s" % str(error), )
def test_run_action(self): assert serviceinstance.run_action(self.task, self.action) self.node.submit_command.assert_called_with(self.action)