# Path: muranoclient/apiclient/exceptions.py
# class ClientException(Exception):
# class MissingArgs(ClientException):
# class ValidationError(ClientException):
# class UnsupportedVersion(ClientException):
# class CommandError(ClientException):
# class AuthorizationFailure(ClientException):
# class ConnectionRefused(ClientException):
# class AuthPluginOptionsMissing(AuthorizationFailure):
# class AuthSystemNotFound(AuthorizationFailure):
# class NoUniqueMatch(ClientException):
# class EndpointException(ClientException):
# class EndpointNotFound(EndpointException):
# class AmbiguousEndpoints(EndpointException):
# class HttpError(ClientException):
# class HTTPRedirection(HttpError):
# class HTTPClientError(HttpError):
# class HttpServerError(HttpError):
# class MultipleChoices(HTTPRedirection):
# class BadRequest(HTTPClientError):
# class Unauthorized(HTTPClientError):
# class PaymentRequired(HTTPClientError):
# class Forbidden(HTTPClientError):
# class NotFound(HTTPClientError):
# class MethodNotAllowed(HTTPClientError):
# class NotAcceptable(HTTPClientError):
# class ProxyAuthenticationRequired(HTTPClientError):
# class RequestTimeout(HTTPClientError):
# class Conflict(HTTPClientError):
# class Gone(HTTPClientError):
# class LengthRequired(HTTPClientError):
# class PreconditionFailed(HTTPClientError):
# class RequestEntityTooLarge(HTTPClientError):
# class RequestUriTooLong(HTTPClientError):
# class UnsupportedMediaType(HTTPClientError):
# class RequestedRangeNotSatisfiable(HTTPClientError):
# class ExpectationFailed(HTTPClientError):
# class UnprocessableEntity(HTTPClientError):
# class InternalServerError(HttpServerError):
# class HttpNotImplemented(HttpServerError):
# class BadGateway(HttpServerError):
# class ServiceUnavailable(HttpServerError):
# class GatewayTimeout(HttpServerError):
# class HttpVersionNotSupported(HttpServerError):
#     def __init__(self, missing):
#     def __init__(self, opt_names):
#     def __init__(self, auth_system):
#     def __init__(self, endpoints=None):
#     def __init__(self, message=None, details=None,
#                  response=None, request_id=None,
#                  url=None, method=None, http_status=None):
#     def __init__(self, *args, **kwargs):
# def from_response(response, url, method):
# 
# Path: muranoclient/tests/unit/base.py
# class TestCaseShell(testtools.TestCase):
# class TestAdditionalAsserts(testtools.TestCase):
#     TEST_REQUEST_BASE = {
#         'verify': True,
#     }
#     def setUp(self):
#     def check_dict_is_subset(self, dict1, dict2):
# 
# Path: muranoclient/v1/package_creator/hot_package.py
# def generate_manifest(args):
# def prepare_package(args):
# 
# Path: muranoclient/v1/package_creator/mpl_package.py
# def prepare_package(args):
# def generate_manifest(args):
# def update_args(args):
# def get_fqn_for_name(namespaces, name):
# def check_derived_from_application(content, extends_from_application):


import os
import shutil
from muranoclient.apiclient import exceptions
from muranoclient.tests.unit import base
from muranoclient.v1.package_creator import hot_package
from muranoclient.v1.package_creator import mpl_package
        args.type = 'Application'
        args.name = 'Test'
        args.tags = ''
        args.ui = UI
        args.logo = LOGO
        args.full_name = 'test.full.name.TestName'
        args.author = 'TestAuthor'
        args.description = 'Test description'

        expected = ("'--resources-dir' parameter should be a directory", )
        try:
            mpl_package.prepare_package(args)
        except exceptions.CommandError as message:
            self.assertEqual(expected, message.args)

    def test_prepare_mpl_package(self):
        args = TestArgs()
        args.template = TEMPLATE
        args.classes_dir = CLASSES_DIR
        args.resources_dir = RESOURCES_DIR
        args.type = 'Application'
        args.name = 'test_name'
        args.author = 'TestAuthor'
        args.full_name = 'test.full.name.TestName'
        args.tags = 'test, tag, Heat'
        args.description = 'Test description'
        args.ui = UI
        args.logo = LOGO
        prepared_files = ['UI', 'Classes', 'manifest.yaml',
                          'Resources', 'logo.png']

# Path: muranoclient/apiclient/exceptions.py
# class ClientException(Exception):
# class MissingArgs(ClientException):
# class ValidationError(ClientException):
# class UnsupportedVersion(ClientException):
# class CommandError(ClientException):
# class AuthorizationFailure(ClientException):
# class ConnectionRefused(ClientException):
# class AuthPluginOptionsMissing(AuthorizationFailure):
# class AuthSystemNotFound(AuthorizationFailure):
# class NoUniqueMatch(ClientException):
# class EndpointException(ClientException):
# class EndpointNotFound(EndpointException):
# class AmbiguousEndpoints(EndpointException):
# class HttpError(ClientException):
# class HTTPRedirection(HttpError):
# class HTTPClientError(HttpError):
# class HttpServerError(HttpError):
# class MultipleChoices(HTTPRedirection):
# class BadRequest(HTTPClientError):
# class Unauthorized(HTTPClientError):
# class PaymentRequired(HTTPClientError):
# class Forbidden(HTTPClientError):
# class NotFound(HTTPClientError):
# class MethodNotAllowed(HTTPClientError):
# class NotAcceptable(HTTPClientError):
# class ProxyAuthenticationRequired(HTTPClientError):
# class RequestTimeout(HTTPClientError):
# class Conflict(HTTPClientError):
# class Gone(HTTPClientError):
# class LengthRequired(HTTPClientError):
# class PreconditionFailed(HTTPClientError):
# class RequestEntityTooLarge(HTTPClientError):
# class RequestUriTooLong(HTTPClientError):
# class UnsupportedMediaType(HTTPClientError):
# class RequestedRangeNotSatisfiable(HTTPClientError):
# class ExpectationFailed(HTTPClientError):
# class UnprocessableEntity(HTTPClientError):
# class InternalServerError(HttpServerError):
# class HttpNotImplemented(HttpServerError):
# class BadGateway(HttpServerError):
# class ServiceUnavailable(HttpServerError):
# class GatewayTimeout(HttpServerError):
# class HttpVersionNotSupported(HttpServerError):
#     def __init__(self, missing):
#     def __init__(self, opt_names):
#     def __init__(self, auth_system):
#     def __init__(self, endpoints=None):
#     def __init__(self, message=None, details=None,
#                  response=None, request_id=None,
#                  url=None, method=None, http_status=None):
#     def __init__(self, *args, **kwargs):
# def from_response(response, url, method):
# 
# Path: muranoclient/tests/unit/base.py
# class TestCaseShell(testtools.TestCase):
# class TestAdditionalAsserts(testtools.TestCase):
#     TEST_REQUEST_BASE = {
#         'verify': True,
#     }
#     def setUp(self):
#     def check_dict_is_subset(self, dict1, dict2):
# 
# Path: muranoclient/v1/package_creator/hot_package.py
# def generate_manifest(args):
# def prepare_package(args):
# 
# Path: muranoclient/v1/package_creator/mpl_package.py
# def prepare_package(args):
# def generate_manifest(args):
# def update_args(args):
# def get_fqn_for_name(namespaces, name):
# def check_derived_from_application(content, extends_from_application):


# Path: muranoclient/tests/unit/test_package_creator.py
import os
import shutil
from muranoclient.apiclient import exceptions
from muranoclient.tests.unit import base
from muranoclient.v1.package_creator import hot_package
from muranoclient.v1.package_creator import mpl_package

        args.type = 'Application'
        args.name = 'Test'
        args.tags = ''
        args.ui = UI
        args.logo = LOGO
        args.full_name = 'test.full.name.TestName'
        args.author = 'TestAuthor'
        args.description = 'Test description'

        expected = ("'--resources-dir' parameter should be a directory", )
        try:
            mpl_package.prepare_package(args)
        except exceptions.CommandError as message:
            self.assertEqual(expected, message.args)

    def test_prepare_mpl_package(self):
        args = TestArgs()
        args.template = TEMPLATE
        args.classes_dir = CLASSES_DIR
        args.resources_dir = RESOURCES_DIR
        args.type = 'Application'
        args.name = 'test_name'
        args.author = 'TestAuthor'
        args.full_name = 'test.full.name.TestName'
        args.tags = 'test, tag, Heat'
        args.description = 'Test description'
        args.ui = UI
        args.logo = LOGO
        prepared_files = ['UI', 'Classes', 'manifest.yaml',
                          'Resources', 'logo.png']

        package_dir = mpl_package.prepare_package(args)