# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):
# 
# Path: heatclient/osc/v1/event.py
# class ShowEvent(command.ShowOne):
# class ListEvent(command.Lister):
# class LogFormatter(base.ListFormatter):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def formatter_default(self):
#     def formatter_namespace(self):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def add_argument_group(self, parser):
#     def emit_list(self, column_names, data, stdout, parsed_args):
# 
# Path: heatclient/tests/unit/osc/v1/fakes.py
# class TestOrchestrationv1(utils.TestCommand):
#     def setUp(self):
# 
# Path: heatclient/v1/events.py
# DEFAULT_PAGE_SIZE = 20
# class Event(base.Resource):
# class EventManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def list(self, stack_id, resource_name=None, **kwargs):
#     def get(self, stack_id, resource_name, event_id):


import copy
import testscenarios
from unittest import mock
from heatclient import exc
from heatclient.osc.v1 import event
from heatclient.tests.unit.osc.v1 import fakes
from heatclient.v1 import events


class TestEventShow(TestEvent):

    scenarios = [
        ('table', dict(format='table')),
        ('shell', dict(format='shell')),
        ('value', dict(format='value')),
    ]

    response = {
        'event': {
            "resource_name": "my_resource",
            "event_time": "2015-11-11T15:23:47Z",
            "links": [],
            "logical_resource_id": "my_resource",
            "resource_status": "CREATE_FAILED",
            "resource_status_reason": "NotFound",
            "physical_resource_id": "null",
            "id": "474bfdf0-a450-46ec-a78a-0c7faa404073"
        }
    }

    def setUp(self):
        super(TestEventShow, self).setUp()
        self.cmd = event.ShowEvent(self.app, None)

    def test_event_show(self):
        arglist = ['--format', self.format, 'my_stack', 'my_resource', '1234']
        parsed_args = self.check_parser(self.cmd, arglist, [])

# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):
# 
# Path: heatclient/osc/v1/event.py
# class ShowEvent(command.ShowOne):
# class ListEvent(command.Lister):
# class LogFormatter(base.ListFormatter):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def formatter_default(self):
#     def formatter_namespace(self):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def add_argument_group(self, parser):
#     def emit_list(self, column_names, data, stdout, parsed_args):
# 
# Path: heatclient/tests/unit/osc/v1/fakes.py
# class TestOrchestrationv1(utils.TestCommand):
#     def setUp(self):
# 
# Path: heatclient/v1/events.py
# DEFAULT_PAGE_SIZE = 20
# class Event(base.Resource):
# class EventManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def list(self, stack_id, resource_name=None, **kwargs):
#     def get(self, stack_id, resource_name, event_id):


# Path: heatclient/tests/unit/osc/v1/test_event.py
import copy
import testscenarios
from unittest import mock
from heatclient import exc
from heatclient.osc.v1 import event
from heatclient.tests.unit.osc.v1 import fakes
from heatclient.v1 import events



class TestEventShow(TestEvent):

    scenarios = [
        ('table', dict(format='table')),
        ('shell', dict(format='shell')),
        ('value', dict(format='value')),
    ]

    response = {
        'event': {
            "resource_name": "my_resource",
            "event_time": "2015-11-11T15:23:47Z",
            "links": [],
            "logical_resource_id": "my_resource",
            "resource_status": "CREATE_FAILED",
            "resource_status_reason": "NotFound",
            "physical_resource_id": "null",
            "id": "474bfdf0-a450-46ec-a78a-0c7faa404073"
        }
    }

    def setUp(self):
        super(TestEventShow, self).setUp()
        self.cmd = event.ShowEvent(self.app, None)

    def test_event_show(self):
        arglist = ['--format', self.format, 'my_stack', 'my_resource', '1234']
        parsed_args = self.check_parser(self.cmd, arglist, [])

        self.event_client.get.return_value = events.Event(None, self.response)