87826c4ccb971911752adbc4bdac8d3e7c28989e,tests/test_actions.py,,test_remote_action_runs,#Any#Any#Any#,83
Before Change
loop.run_until_complete(remote_action.run(default_dispatcher_collecting,
tracker,
default_domain))
httpretty.disable()
assert (httpretty.latest_requests[-1].path ==
"/webhooks/actions")
After Change
remote_action = action.RemoteAction("my_action",
endpoint)
with aioresponses() as mocked:
mocked.post(
"https://example.com/webhooks/actions",
payload={"events": [], "responses": []})
loop.run_until_complete(remote_action.run(default_dispatcher_collecting,
tracker,
default_domain))
r = latest_request(mocked, "post",
"https://example.com/webhooks/actions")
assert r
assert json_of_latest_request(r) == {
"domain": default_domain.as_dict(),
"next_action": "my_action",
"sender_id": "default",
"version": rasa_core.__version__,
"tracker": {
"latest_message": {
"entities": [],
"intent": {},
"text": None
},
"active_form": {},
"latest_action_name": None,
"sender_id": "default",
"paused": False,
"latest_event_time": None,
"followup_action": "action_listen",
"slots": {"name": None},
"events": [],
"latest_input_channel": None
}
}
def test_remote_action_logs_events(loop,
default_dispatcher_collecting,
default_domain):
tracker = DialogueStateTracker("default",
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: RasaHQ/rasa
Commit Name: 87826c4ccb971911752adbc4bdac8d3e7c28989e
Time: 2019-01-21
Author: tom@rasa.com
File Name: tests/test_actions.py
Class Name:
Method Name: test_remote_action_runs
Project Name: RasaHQ/rasa
Commit Name: 87826c4ccb971911752adbc4bdac8d3e7c28989e
Time: 2019-01-21
Author: tom@rasa.com
File Name: tests/test_utils.py
Class Name:
Method Name: test_endpoint_config
Project Name: RasaHQ/rasa
Commit Name: 87826c4ccb971911752adbc4bdac8d3e7c28989e
Time: 2019-01-21
Author: tom@rasa.com
File Name: tests/test_channels.py
Class Name:
Method Name: test_callback_calls_endpoint