<s> from unittest2 import TestCase <EOL> from st2actions . runners . utils import get_action_class_instance <EOL> from st2tests . mocks . action import MockActionWrapper <EOL> from st2tests . mocks . action import MockActionService <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> class BaseActionTestCase ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> action_cls = None <EOL> def setUp ( self ) : <EOL> super ( BaseActionTestCase , self ) . setUp ( ) <EOL> class_name = self . action_cls . __name__ <EOL> action_wrapper = MockActionWrapper ( pack = '<STR_LIT>' , class_name = class_name ) <EOL> self . action_service = MockActionService ( action_wrapper = action_wrapper ) <EOL> def get_action_instance ( self , config = None ) : <EOL> """<STR_LIT>""" <EOL> instance = get_action_class_instance ( action_cls = self . action_cls , <EOL> config = config , <EOL> action_service = self . action_service ) <EOL> return instance </s>
