From f4659f722de1801bd7dadf0dc5df7b37fabbf75b Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 14 Nov 2023 18:42:07 -0800 Subject: [PATCH] Add test to ensure input context is unmodified --- test/unittests/common_query/test_common_query.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/unittests/common_query/test_common_query.py b/test/unittests/common_query/test_common_query.py index 2593a2b0c6b5..f284075c148f 100644 --- a/test/unittests/common_query/test_common_query.py +++ b/test/unittests/common_query/test_common_query.py @@ -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'}