87826c4ccb971911752adbc4bdac8d3e7c28989e,tests/test_interactive.py,,test_print_history,#Any#Any#,117

Before Change


    httpretty.enable()
    loop.run_until_complete(
        interactive._print_history(sender_id, mock_endpoint))
    httpretty.disable()

    b = httpretty.latest_requests[-1].body.decode("utf-8")
    assert b == ""
    assert (httpretty.latest_requests[-1].path ==

After Change



    url = "{}/conversations/{}/tracker?include_events=AFTER_RESTART".format(
        mock_endpoint.url, sender_id)
    with aioresponses() as mocked:
        mocked.get(url,
                   body=tracker_dump,
                   headers={"Accept": "application/json"})

        loop.run_until_complete(
            interactive._print_history(sender_id, mock_endpoint))

        assert latest_request(mocked, "get", url) is not None


def test_is_listening_for_messages(loop, mock_endpoint):
    tracker_dump = utils.read_file(
        "data/test_trackers/tracker_moodbot.json")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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_print_history


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_interactive_domain_persistence


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_is_listening_for_messages