def test_run_action(): f_name = "tests.test_action_manager.function_to_call" action_manager.load_actions({"test_action": f_name}, "rest_server") assert action_manager.run_action("test_action", {"value": 1}) == 1
def init(actions_dict, actions_module): actions_definition.load(actions_dict) func_dict = {k: v['function'] for k, v in actions_dict.iteritems()} action_manager.load_actions(func_dict, actions_module)