# Path: muranoclient/osc/v1/action.py
# LOG = logging.getLogger(__name__)
# class StaticActionCall(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/static_actions.py
# class StaticActionResult(object):
# class StaticActionManager(object):
#     def __init__(self, result, exception=None):
#     def get_result(self):
#     def check_result(self):
#     def __init__(self, api):
#     def call(self, arguments):


from unittest import mock
from muranoclient.osc.v1 import action as osc_action
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import static_actions as api_static_actions
#    License for the specific language governing permissions and limitations
#    under the License.




class TestAction(fakes.TestApplicationCatalog):
    def setUp(self):
        super(TestAction, self).setUp()
        self.static_actions_mock = \
            self.app.client_manager.application_catalog.static_actions


class TestStaticActionCall(TestAction):
    def setUp(self):
        super(TestStaticActionCall, self).setUp()
        self.static_actions_mock.call.return_value = \
            api_static_actions.StaticActionResult('result')

        # Command to test
        self.cmd = osc_action.StaticActionCall(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_static_action_call_basic(self, mock_util):
        mock_util.return_value = 'result'

        arglist = ['class.name', 'method.name']
        verifylist = [('class_name', 'class.name'),
                      ('method_name', 'method.name')]


# Path: muranoclient/osc/v1/action.py
# LOG = logging.getLogger(__name__)
# class StaticActionCall(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/static_actions.py
# class StaticActionResult(object):
# class StaticActionManager(object):
#     def __init__(self, result, exception=None):
#     def get_result(self):
#     def check_result(self):
#     def __init__(self, api):
#     def call(self, arguments):


# Path: muranoclient/tests/unit/osc/v1/test_action.py
from unittest import mock
from muranoclient.osc.v1 import action as osc_action
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import static_actions as api_static_actions

#    License for the specific language governing permissions and limitations
#    under the License.




class TestAction(fakes.TestApplicationCatalog):
    def setUp(self):
        super(TestAction, self).setUp()
        self.static_actions_mock = \
            self.app.client_manager.application_catalog.static_actions


class TestStaticActionCall(TestAction):
    def setUp(self):
        super(TestStaticActionCall, self).setUp()
        self.static_actions_mock.call.return_value = \
            api_static_actions.StaticActionResult('result')

        # Command to test
        self.cmd = osc_action.StaticActionCall(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_static_action_call_basic(self, mock_util):
        mock_util.return_value = 'result'

        arglist = ['class.name', 'method.name']
        verifylist = [('class_name', 'class.name'),
                      ('method_name', 'method.name')]


        parsed_args = self.check_parser(self.cmd, arglist, verifylist)