87826c4ccb971911752adbc4bdac8d3e7c28989e,tests/test_interactive.py,,test_send_message,#Any#Any#,17

Before Change


        interactive.send_message(mock_endpoint, sender_id, "Hello"))
    httpretty.disable()

    b = httpretty.latest_requests[-1].body.decode("utf-8")
    assert json.loads(b) == {
        "sender": "user",
        "message": "Hello",
        "parse_data": None

After Change



    url = "{}/conversations/{}/messages".format(
        mock_endpoint.url, sender_id)
    with aioresponses() as mocked:
        mocked.post(url, payload={})

        loop.run_until_complete(
            interactive.send_message(mock_endpoint, sender_id, "Hello"))

        r = latest_request(mocked, "post", url)

        assert r

        assert json_of_latest_request(r) == {
            "sender": "user",
            "message": "Hello",
            "parse_data": None
        }


def test_request_prediction(loop, mock_endpoint):
    sender_id = uuid.uuid4().hex

    url = "{}/conversations/{}/predict".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: RasaHQ/rasa
Commit Name: 87826c4ccb971911752adbc4bdac8d3e7c28989e
Time: 2019-01-21
Author: tom@rasa.com
File Name: tests/test_interactive.py
Class Name:
Method Name: test_send_message


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_actions.py
Class Name:
Method Name: test_remote_action_logs_events