From 32ce9f3e35ca6d78c13564a5c705286005e10330 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Thu, 12 Oct 2023 20:00:26 +0100 Subject: [PATCH] fix more tests --- .../unittests/common_query/test_continuous_dialog.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/unittests/common_query/test_continuous_dialog.py b/test/unittests/common_query/test_continuous_dialog.py index aa7a46cf9a7f..06d10cf70002 100644 --- a/test/unittests/common_query/test_continuous_dialog.py +++ b/test/unittests/common_query/test_continuous_dialog.py @@ -38,13 +38,15 @@ def test_continuous_dialog(self): {"query": "what is the speed of light"})) self.assertEqual(self.bus.emitted_msgs[0], - {'context': {'skill_id': 'wiki.test'}, + {'context': {'skill_id': 'wiki.test', + 'session': self.bus.emitted_msgs[0]["context"]["session"]}, 'data': {'context': 'wiki_testFakeWikiKnows', 'origin': '', 'word': 'what is the speed of light'}, 'type': 'add_context'}) self.assertEqual(self.bus.emitted_msgs[-1], - {'context': {'skill_id': 'wiki.test'}, + {'context': {'skill_id': 'wiki.test', + 'session': self.bus.emitted_msgs[-1]["context"]["session"]}, 'data': {'expect_response': False, 'lang': 'en-us', 'meta': {'skill': 'wiki.test'}, @@ -56,7 +58,8 @@ def test_continuous_dialog(self): self.skill.handle_tell_more(Message("FakeWikiMore")) self.assertEqual(self.bus.emitted_msgs[-1], - {'context': {'skill_id': 'wiki.test'}, + {'context': {'skill_id': 'wiki.test', + 'session': self.bus.emitted_msgs[-1]["context"]["session"]}, 'data': {'expect_response': False, 'lang': 'en-us', 'meta': {'skill': 'wiki.test'}, @@ -73,7 +76,8 @@ def test_continuous_dialog(self): # removal of context to disable "tell me more" self.assertEqual(self.bus.emitted_msgs[-1], - {'context': {'skill_id': 'wiki.test'}, + {'context': {'skill_id': 'wiki.test', + 'session': self.bus.emitted_msgs[-1]["context"]["session"]}, 'data': {'context': 'wiki_testFakeWikiKnows'}, 'type': 'remove_context'}) self.assertFalse(self.skill.has_context)