# Path: ironicclient/exc.py
# class AmbiguousAuthSystem(exceptions.ClientException):
# class InvalidAttribute(exceptions.ClientException):
# class StateTransitionFailed(exceptions.ClientException):
# class StateTransitionTimeout(exceptions.ClientException):
# def from_response(response, message=None, traceback=None, method=None,
#                   url=None):
# 
# Path: ironicclient/tests/unit/utils.py
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
#     def setUp(self):
#     def __init__(self, responses, path_prefix=None):
#     def _request(self, method, url, headers=None, body=None, params=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, path_prefix=None):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __repr__(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None, request_headers={}):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def __repr__(self):
# def mockSessionResponse(headers, content=None, status_code=None, version=None,
#                         request_headers={}):
# def mockSession(headers, content=None, status_code=None, version=None):
# 
# Path: ironicclient/v1/driver.py
# class Driver(base.Resource):
# class DriverManager(base.Manager):
#     def __repr__(self):
#     def list(self, driver_type=None, detail=None, os_ironic_api_version=None,
#              global_request_id=None, fields=None):
#     def get(self, driver_name, os_ironic_api_version=None,
#             global_request_id=None, fields=None):
#     def update(self, driver_name, patch, http_method='PATCH',
#                os_ironic_api_version=None, global_request_id=None):
#     def delete(self, driver_name, os_ironic_api_version=None,
#                global_request_id=None):
#     def properties(self, driver_name, os_ironic_api_version=None,
#                    global_request_id=None):
#     def raid_logical_disk_properties(self, driver_name,
#                                      os_ironic_api_version=None,
#                                      global_request_id=None):
#     def vendor_passthru(self, driver_name, method, args=None,
#                         http_method=None, os_ironic_api_version=None,
#                         global_request_id=None):
#     def get_vendor_passthru_methods(self, driver_name,
#                                     os_ironic_api_version=None,
#                                     global_request_id=None):


from unittest import mock
from testtools import matchers
from ironicclient import exc
from ironicclient.tests.unit import utils
from ironicclient.v1 import driver
import testtools
            'http_method': 'GET',
        }

        final_path = 'driver_name/vendor_passthru/method'
        self.mgr.vendor_passthru(**kwargs)
        get_mock.assert_called_once_with(
            mock.ANY, final_path, os_ironic_api_version=None,
            global_request_id=None)

    @mock.patch.object(driver.DriverManager, 'delete', autospec=True)
    def test_vendor_passthru_delete(self, delete_mock):
        kwargs = {
            'driver_name': 'driver_name',
            'method': 'method',
            'http_method': 'DELETE',
        }

        final_path = 'driver_name/vendor_passthru/method'
        self.mgr.vendor_passthru(**kwargs)
        delete_mock.assert_called_once_with(
            mock.ANY, final_path, os_ironic_api_version=None,
            global_request_id=None)

    @mock.patch.object(driver.DriverManager, 'delete', autospec=True)
    def test_vendor_passthru_unknown_http_method(self, delete_mock):
        kwargs = {
            'driver_name': 'driver_name',
            'method': 'method',
            'http_method': 'UNKNOWN',
        }

# Path: ironicclient/exc.py
# class AmbiguousAuthSystem(exceptions.ClientException):
# class InvalidAttribute(exceptions.ClientException):
# class StateTransitionFailed(exceptions.ClientException):
# class StateTransitionTimeout(exceptions.ClientException):
# def from_response(response, message=None, traceback=None, method=None,
#                   url=None):
# 
# Path: ironicclient/tests/unit/utils.py
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
#     def setUp(self):
#     def __init__(self, responses, path_prefix=None):
#     def _request(self, method, url, headers=None, body=None, params=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, path_prefix=None):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __repr__(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None, request_headers={}):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def __repr__(self):
# def mockSessionResponse(headers, content=None, status_code=None, version=None,
#                         request_headers={}):
# def mockSession(headers, content=None, status_code=None, version=None):
# 
# Path: ironicclient/v1/driver.py
# class Driver(base.Resource):
# class DriverManager(base.Manager):
#     def __repr__(self):
#     def list(self, driver_type=None, detail=None, os_ironic_api_version=None,
#              global_request_id=None, fields=None):
#     def get(self, driver_name, os_ironic_api_version=None,
#             global_request_id=None, fields=None):
#     def update(self, driver_name, patch, http_method='PATCH',
#                os_ironic_api_version=None, global_request_id=None):
#     def delete(self, driver_name, os_ironic_api_version=None,
#                global_request_id=None):
#     def properties(self, driver_name, os_ironic_api_version=None,
#                    global_request_id=None):
#     def raid_logical_disk_properties(self, driver_name,
#                                      os_ironic_api_version=None,
#                                      global_request_id=None):
#     def vendor_passthru(self, driver_name, method, args=None,
#                         http_method=None, os_ironic_api_version=None,
#                         global_request_id=None):
#     def get_vendor_passthru_methods(self, driver_name,
#                                     os_ironic_api_version=None,
#                                     global_request_id=None):


# Path: ironicclient/tests/unit/v1/test_driver.py
from unittest import mock
from testtools import matchers
from ironicclient import exc
from ironicclient.tests.unit import utils
from ironicclient.v1 import driver
import testtools

            'http_method': 'GET',
        }

        final_path = 'driver_name/vendor_passthru/method'
        self.mgr.vendor_passthru(**kwargs)
        get_mock.assert_called_once_with(
            mock.ANY, final_path, os_ironic_api_version=None,
            global_request_id=None)

    @mock.patch.object(driver.DriverManager, 'delete', autospec=True)
    def test_vendor_passthru_delete(self, delete_mock):
        kwargs = {
            'driver_name': 'driver_name',
            'method': 'method',
            'http_method': 'DELETE',
        }

        final_path = 'driver_name/vendor_passthru/method'
        self.mgr.vendor_passthru(**kwargs)
        delete_mock.assert_called_once_with(
            mock.ANY, final_path, os_ironic_api_version=None,
            global_request_id=None)

    @mock.patch.object(driver.DriverManager, 'delete', autospec=True)
    def test_vendor_passthru_unknown_http_method(self, delete_mock):
        kwargs = {
            'driver_name': 'driver_name',
            'method': 'method',
            'http_method': 'UNKNOWN',
        }

        self.assertRaises(exc.InvalidAttribute, self.mgr.vendor_passthru,