本文整理汇总了Python中st2actions.handlers.mistral.MistralCallbackHandler类的典型用法代码示例。如果您正苦于以下问题:Python MistralCallbackHandler类的具体用法?Python MistralCallbackHandler怎么用?Python MistralCallbackHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MistralCallbackHandler类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_callback_handler_with_result_as_list_str
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
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
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
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
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
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
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
def test_callback_handler_with_result_as_text(self):
MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
LIVEACTION_STATUS_SUCCEEDED, '<html></html>')