本文整理汇总了Python中st2actions.handlers.mistral.MistralCallbackHandler.callback方法的典型用法代码示例。如果您正苦于以下问题:Python MistralCallbackHandler.callback方法的具体用法?Python MistralCallbackHandler.callback怎么用?Python MistralCallbackHandler.callback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类st2actions.handlers.mistral.MistralCallbackHandler
的用法示例。
在下文中一共展示了MistralCallbackHandler.callback方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_callback_handler_with_result_as_list_str
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_list_str(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/action_executions/12345', {},
action_constants.LIVEACTION_STATUS_SUCCEEDED,
'["a", "b", "c"]')
示例2: test_callback_handler_with_result_as_text
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_text(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/action_executions/12345', {},
action_constants.LIVEACTION_STATUS_SUCCEEDED,
'<html></html>')
示例3: test_callback_handler_with_result_as_json_str
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_json_str(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/action_executions/12345', {},
action_constants.LIVEACTION_STATUS_SUCCEEDED, '{"a": 1}')
MistralCallbackHandler.callback('http://localhost:8989/v2/action_executions/12345', {},
action_constants.LIVEACTION_STATUS_SUCCEEDED, "{'a': 1}")
示例4: test_callback_handler_with_result_as_dict
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_dict(self):
MistralCallbackHandler.callback('http://127.0.0.1:8989/v2/action_executions/12345', {},
action_constants.LIVEACTION_STATUS_SUCCEEDED, {'a': 1})
示例5: test_callback_handler_with_result_as_list_str
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_list_str(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
ACTIONEXEC_STATUS_SUCCEEDED, '["a", "b", "c"]')
示例6: test_callback_handler_with_result_as_json_str
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_json_str(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
ACTIONEXEC_STATUS_SUCCEEDED, '{"a": 1}')
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
ACTIONEXEC_STATUS_SUCCEEDED, "{'a': 1}")
示例7: test_callback_handler_with_result_as_dict
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_dict(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
ACTIONEXEC_STATUS_SUCCEEDED, {'a': 1})
示例8: test_callback_handler_with_result_as_text
# 需要导入模块: from st2actions.handlers.mistral import MistralCallbackHandler [as 别名]
# 或者: from st2actions.handlers.mistral.MistralCallbackHandler import callback [as 别名]
def test_callback_handler_with_result_as_text(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
LIVEACTION_STATUS_SUCCEEDED, '<html></html>')