# Path: heatclient/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):
# 
# Path: heatclient/v1/software_deployments.py
# class SoftwareDeployment(base.Resource):
# class SoftwareDeploymentManager(base.BaseManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def list(self, **kwargs):
#     def metadata(self, server_id):
#     def get(self, deployment_id):
#     def create(self, **kwargs):
#     def update(self, deployment_id, **kwargs):
#     def delete(self, deployment_id):


from unittest import mock
from heatclient.common import utils
from heatclient.v1 import software_deployments
import testtools
    def test_create(self, mock_utils):
        deployment_id = 'bca6871d-86c0-4aff-b792-58a1f6947b57'
        config_id = 'd00ba4aa-db33-42e1-92f4-2a6469260107'
        server_id = 'fb322564-7927-473d-8aad-68ae7fbf2abf'
        body = {
            'server_id': server_id,
            'input_values': {},
            'action': 'INIT',
            'status': 'COMPLETE',
            'status_reason': None,
            'signal_id': None,
            'config_id': config_id}
        data = body.copy()
        data['id'] = deployment_id
        self.manager.client.post.return_value = {}
        mock_utils.return_value = {'software_deployment': data}
        result = self.manager.create(**body)
        self.assertEqual(software_deployments.SoftwareDeployment(
            self.manager, data), result)
        args, kwargs = self.manager.client.post.call_args
        self.assertEqual('/software_deployments', args[0])
        self.assertEqual({'data': body}, kwargs)

    def test_delete(self):
        deployment_id = 'bca6871d-86c0-4aff-b792-58a1f6947b57'
        self.manager.delete(deployment_id)
        call_args = self.manager.client.delete.call_args
        self.assertEqual(
            ('/software_deployments/%s' % deployment_id,), *call_args)


# Path: heatclient/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):
# 
# Path: heatclient/v1/software_deployments.py
# class SoftwareDeployment(base.Resource):
# class SoftwareDeploymentManager(base.BaseManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def list(self, **kwargs):
#     def metadata(self, server_id):
#     def get(self, deployment_id):
#     def create(self, **kwargs):
#     def update(self, deployment_id, **kwargs):
#     def delete(self, deployment_id):


# Path: heatclient/tests/unit/test_software_deployments.py
from unittest import mock
from heatclient.common import utils
from heatclient.v1 import software_deployments
import testtools

    def test_create(self, mock_utils):
        deployment_id = 'bca6871d-86c0-4aff-b792-58a1f6947b57'
        config_id = 'd00ba4aa-db33-42e1-92f4-2a6469260107'
        server_id = 'fb322564-7927-473d-8aad-68ae7fbf2abf'
        body = {
            'server_id': server_id,
            'input_values': {},
            'action': 'INIT',
            'status': 'COMPLETE',
            'status_reason': None,
            'signal_id': None,
            'config_id': config_id}
        data = body.copy()
        data['id'] = deployment_id
        self.manager.client.post.return_value = {}
        mock_utils.return_value = {'software_deployment': data}
        result = self.manager.create(**body)
        self.assertEqual(software_deployments.SoftwareDeployment(
            self.manager, data), result)
        args, kwargs = self.manager.client.post.call_args
        self.assertEqual('/software_deployments', args[0])
        self.assertEqual({'data': body}, kwargs)

    def test_delete(self):
        deployment_id = 'bca6871d-86c0-4aff-b792-58a1f6947b57'
        self.manager.delete(deployment_id)
        call_args = self.manager.client.delete.call_args
        self.assertEqual(
            ('/software_deployments/%s' % deployment_id,), *call_args)


    @mock.patch.object(utils, 'get_response_body')