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
3
Example 1
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(),
))
3
Example 2
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")