示例#1
0
 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}")
示例#2
0
 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"]')
示例#3
0
 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
0
 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>')
示例#5
0
 def test_callback_handler_with_result_as_list_str(self):
     MistralCallbackHandler.callback('http://127.0.0.1:8989/v2/action_executions/12345', {},
                                     action_constants.LIVEACTION_STATUS_SUCCEEDED,
                                     '["a", "b", "c"]')
示例#6
0
 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})
示例#7
0
 def test_callback_handler_with_result_as_text(self):
     MistralCallbackHandler.callback('http://127.0.0.1:8989/v2/action_executions/12345', {},
                                     action_constants.LIVEACTION_STATUS_SUCCEEDED,
                                     '<html></html>')
示例#8
0
 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}")
示例#9
0
 def test_callback_handler_with_result_as_list_str(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
                                     ACTIONEXEC_STATUS_SUCCEEDED, '["a", "b", "c"]')
示例#10
0
 def test_callback_handler_with_result_as_dict(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
                                     ACTIONEXEC_STATUS_SUCCEEDED, {'a': 1})
示例#11
0
 def test_callback_handler_with_result_as_text(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345', {},
                                     LIVEACTION_STATUS_SUCCEEDED, '<html></html>')
示例#12
0
 def test_callback_handler_with_result_as_list_str(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345',
                                     {}, LIVEACTION_STATUS_SUCCEEDED,
                                     '["a", "b", "c"]')
示例#13
0
 def test_callback_handler_with_result_as_dict(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/tasks/12345',
                                     {}, LIVEACTION_STATUS_SUCCEEDED,
                                     {'a': 1})
示例#14
0
 def test_callback_handler_with_result_as_list(self):
     MistralCallbackHandler.callback('http://localhost:8989/v2/action_executions/12345', {},
                                     LIVEACTION_STATUS_SUCCEEDED, ["a", "b", "c"])