def _test_get_action_handler(my): search_type = "unittest/person" # get the definition directly view = "edit" config = WidgetConfigView.get_by_search_type(search_type, view) action_handler = config.get_action_handler("drop") my.assertEquals("DropElementAction", action_handler) action_handler = config.get_action_handler("code") my.assertEquals("", action_handler) config = WidgetConfigView.get_by_search_type(search_type, 'test') action_handler = config.get_action_handler("drop") my.assertEquals("", action_handler) # get_by_elemnet_names will get it config = WidgetConfigView.get_by_element_names(search_type, ['drop'], 'test') action_handler = config.get_action_handler("drop") my.assertEquals("DropElementAction", action_handler) options = config.get_action_options("drop") my.assertEquals("path_test", options.get('path'))
def _test_get_action_handler(self): search_type = "unittest/person" # get the definition directly view = "edit" config = WidgetConfigView.get_by_search_type(search_type, view) action_handler = config.get_action_handler("drop") self.assertEquals("DropElementAction", action_handler) action_handler = config.get_action_handler("code") self.assertEquals("", action_handler) config = WidgetConfigView.get_by_search_type(search_type, 'test') action_handler = config.get_action_handler("drop") self.assertEquals("", action_handler) # get_by_elemnet_names will get it config = WidgetConfigView.get_by_element_names(search_type, ['drop'], 'test') action_handler = config.get_action_handler("drop") self.assertEquals("DropElementAction", action_handler) options = config.get_action_options("drop") self.assertEquals("path_test", options.get('path'))