87826c4ccb971911752adbc4bdac8d3e7c28989e,tests/test_interactive.py,,test_undo_latest_msg,#Any#Any#,200
Before Change
loop.run_until_complete(interactive._undo_latest(sender_id, mock_endpoint))
httpretty.disable()
b = httpretty.latest_requests[-1].body.decode("utf-8")
// this should be the events the interactive call send to the endpoint
// these events should have the last utterance omitted
replaced_evts = json.loads(b)
assert len(replaced_evts) == 6
assert replaced_evts == evts[:6]
After Change
mock_endpoint.url, sender_id)
replace_url = "{}/conversations/{}/tracker/events".format(
mock_endpoint.url, sender_id)
with aioresponses() as mocked:
mocked.get(url, body=tracker_dump)
mocked.put(replace_url)
loop.run_until_complete(
interactive._undo_latest(sender_id, mock_endpoint))
r = latest_request(mocked, "put", replace_url)
assert r
// this should be the events the interactive call send to the endpoint
// these events should have the last utterance omitted
replaced_evts = json_of_latest_request(r)
assert len(replaced_evts) == 6
assert replaced_evts == evts[:6]
def test_utter_custom_message():
test_event =
{
"data": {
In pattern: SUPERPATTERN
Frequency: 6
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_undo_latest_msg
Project Name: huyingxi/Synonyms
Commit Name: caf046f34fbde018e95c2b392401730be67e46f5
Time: 2020-09-24
Author: hain@chatopera.com
File Name: synonyms/jieba/analyse/tfidf.py
Class Name: IDFLoader
Method Name: set_new_path
Project Name: biolab/orange3
Commit Name: b535452389d79b579dd499374bab66b4ecc87f1f
Time: 2016-11-24
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/data/owpythonscript.py
Class Name: OWPythonScript
Method Name: onAddScriptFromFile
Project Name: scikit-image/scikit-image
Commit Name: ddfac3e42d2ae2e09751de6638d813c76e30ff94
Time: 2018-12-04
Author: mark.harfouche@gmail.com
File Name: tools/check_sdist.py
Class Name:
Method Name:
Project Name: tensorflow/datasets
Commit Name: c28a63fa9d9fb9ba3cced7052ea243e8884f9bf1
Time: 2019-11-21
Author: supertux90@googlemail.com
File Name: tensorflow_datasets/image/deep_weeds.py
Class Name: DeepWeeds
Method Name: _generate_examples
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