@mock.patch.object(conductor_utils, 'LOG', autospec=True)
    def test_node_power_action_in_same_state(self, log_mock):
        node = obj_utils.create_test_node(self.context,
                                          uuid=uuidutils.generate_uuid(),
                                          driver='fake',
                                          last_error='anything but None',
                                          power_state=states.POWER_ON)
        task = task_manager.TaskManager(self.context, node.uuid)

        with mock.patch.object(self.driver.power,
                               'get_power_state') as get_power_mock:
            get_power_mock.return_value = states.POWER_ON

            with mock.patch.object(self.driver.power,
                                   'set_power_state') as set_power_mock:
                conductor_utils.node_power_action(task, states.POWER_ON)

                node.refresh()
                get_power_mock.assert_called_once_with(mock.ANY)
                self.assertFalse(set_power_mock.called,
                                 "set_power_state unexpectedly called")
                self.assertEqual(states.POWER_ON, node['power_state'])
                self.assertIsNone(node['target_power_state'])
                self.assertIsNone(node['last_error'])
                log_mock.warning.assert_called_once_with(
                    u"Not going to change node %(node)s power state because "
                    u"current state = requested state = '%(state)s'.",
                    {'state': states.POWER_ON, 'node': node.uuid})
Set the *default* value for this configuration view. The
dataset/ETHPy150Open openstack/ironic/ironic/tests/unit/conductor/test_utils.py/NodePowerActionTestCase.test_node_power_action_in_same_state--crossover with--dataset/ETHPy150Open beetbox/beets/beets/util/confit.py/ConfigView.add