Skip to content

Commit

Permalink
Add test to ensure input context is unmodified
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Nov 15, 2023
1 parent f3bed8e commit f4659f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/unittests/common_query/test_common_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ def test_common_query_events(self):
self.bus.emitted_msgs = []
self.assertEqual(self.cc.skill_id, "common_query.openvoiceos")

qq_ctxt = {"source": "audio", "destination": "skills", 'skill_id': self.cc.skill_id}
qq_ans_ctxt = {"source": "skills", "destination": "audio", 'skill_id': self.cc.skill_id}
qq_ctxt = {"source": "audio",
"destination": "skills",
'skill_id': self.cc.skill_id}
qq_ans_ctxt = {"source": "skills",
"destination": "audio",
'skill_id': self.cc.skill_id}
original_ctxt = dict(qq_ctxt)
self.bus.emit(Message("common_query.question",
{"utterance": "what is the speed of light"},
qq_ctxt))

self.assertEqual(qq_ctxt, original_ctxt, qq_ctxt)
skill_ctxt = {"source": "audio", "destination": "skills", 'skill_id': 'wiki.test'}
skill_ans_ctxt = {"source": "skills", "destination": "audio", 'skill_id': 'wiki.test'}

Expand Down

0 comments on commit f4659f7

Please sign in to comment.