mock.call.chassis_set_boot

Here are the examples of the python api mock.call.chassis_set_boot taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

Example 1

Project: fuel-devops Source File: test_node.py
Function: test_start
    def test_start(self):
        self.ipmiclient.power_status.return_value = 1

        self.node.start()

        self.ipmiclient.assert_has_calls((
            mock.call.chassis_set_boot('pxe'),
            mock.call.power_status(),
            mock.call.power_on(),
        ))

Example 2

Project: fuel-devops Source File: test_node.py
Function: test_restart
    def test_restart(self):
        self.ipmiclient.power_status.return_value = 0

        self.node.start()

        self.ipmiclient.assert_has_calls((
            mock.call.chassis_set_boot('pxe'),
            mock.call.power_status(),
            mock.call.power_reset(),
        ))
        self.wait_mock.assert_called_once_with(
            self.node.is_active,
            timeout=60,
            timeout_msg="Node test_node / ipmi-1.hostaddress.net wasn't "
                        "started in 60 sec")