# 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):


import copy
import testtools
import ironicclient.v1.deploy_template
from testtools.matchers import HasLength
from ironicclient import exc
from ironicclient.tests.unit import utils
        super(DeployTemplateManagerTest, self).setUp()
        self.api = utils.FakeAPI(fake_responses)
        self.mgr = ironicclient.v1.deploy_template.DeployTemplateManager(
            self.api)

    def test_deploy_templates_list(self):
        deploy_templates = self.mgr.list()
        expect = [
            ('GET', '/v1/deploy_templates', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_templates_list_detail(self):
        deploy_templates = self.mgr.list(detail=True)
        expect = [
            ('GET', '/v1/deploy_templates/?detail=True', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_template_list_fields(self):
        deploy_templates = self.mgr.list(fields=['uuid', 'name'])
        expect = [
            ('GET', '/v1/deploy_templates/?fields=uuid,name', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_template_list_detail_and_fields_fail(self):

# 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/tests/unit/v1/test_deploy_template.py
import copy
import testtools
import ironicclient.v1.deploy_template
from testtools.matchers import HasLength
from ironicclient import exc
from ironicclient.tests.unit import utils

        super(DeployTemplateManagerTest, self).setUp()
        self.api = utils.FakeAPI(fake_responses)
        self.mgr = ironicclient.v1.deploy_template.DeployTemplateManager(
            self.api)

    def test_deploy_templates_list(self):
        deploy_templates = self.mgr.list()
        expect = [
            ('GET', '/v1/deploy_templates', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_templates_list_detail(self):
        deploy_templates = self.mgr.list(detail=True)
        expect = [
            ('GET', '/v1/deploy_templates/?detail=True', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_template_list_fields(self):
        deploy_templates = self.mgr.list(fields=['uuid', 'name'])
        expect = [
            ('GET', '/v1/deploy_templates/?fields=uuid,name', {}, None),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(deploy_templates))

    def test_deploy_template_list_detail_and_fields_fail(self):

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