def test__get_next_persistent_boot_mode(self, mock_get_drac_client): mock_client = mock.Mock() mock_get_drac_client.return_value = mock_client mock_client.list_boot_modes.return_value = self.boot_modes('IPL') boot_mode = drac_mgmt._get_next_persistent_boot_mode(self.node) mock_get_drac_client.assert_called_once_with(self.node) mock_client.list_boot_modes.assert_called_once_with() expected_boot_mode = 'IPL' self.assertEqual(expected_boot_mode, boot_mode)
def test__get_next_persistent_boot_mode(self, mock_get_drac_client): mock_client = mock.Mock() mock_get_drac_client.return_value = mock_client mock_client.list_boot_modes.return_value = self.boot_modes('IPL') boot_mode = drac_mgmt._get_next_persistent_boot_mode(self.node) mock_get_drac_client.assert_called_once_with(self.node) mock_client.list_boot_modes.assert_called_once_with() expected_boot_mode = 'IPL' self.assertEqual(expected_boot_mode, boot_mode)