From da7d0d7584f46c8ce33626569e51ae079fb2b94f Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Sat, 30 Sep 2023 01:15:43 +0100 Subject: [PATCH] update tests --- test/unittests/skills/test_mycroft_skill.py | 6 +++--- test/unittests/skills/test_mycroft_skill_get_response.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/unittests/skills/test_mycroft_skill.py b/test/unittests/skills/test_mycroft_skill.py index 95165fd5e242..fe03706bd669 100644 --- a/test/unittests/skills/test_mycroft_skill.py +++ b/test/unittests/skills/test_mycroft_skill.py @@ -603,10 +603,10 @@ def test_native_langs(self): s.config_core['secondary_langs'] = ['en', 'en-us', 'en-AU', 'es', 'pt-PT'] self.assertEqual(s.lang, 'en-us') - self.assertEqual(s._secondary_langs, ['en', 'en-au', 'es', + self.assertEqual(s.secondary_langs, ['en', 'en-au', 'es', 'pt-pt']) - self.assertEqual(len(s._native_langs), len(set(s._native_langs))) - self.assertEqual(set(s._native_langs), {'en-us', 'en-au', 'pt-pt'}) + self.assertEqual(len(s.native_langs), len(set(s.native_langs))) + self.assertEqual(set(s.native_langs), {'en-us', 'en-au', 'pt-pt'}) s.config_core['lang'] = lang s.config_core['secondary_langs'] = secondary diff --git a/test/unittests/skills/test_mycroft_skill_get_response.py b/test/unittests/skills/test_mycroft_skill_get_response.py index 5cbea497d292..51af97eed0ca 100644 --- a/test/unittests/skills/test_mycroft_skill_get_response.py +++ b/test/unittests/skills/test_mycroft_skill_get_response.py @@ -162,13 +162,13 @@ def test_converse_detection(self): skill.speak_dialog = mock.Mock() def validator(*args, **kwargs): - self.assertTrue(skill._converse_is_implemented) + self.assertTrue(skill.converse_is_implemented) - self.assertFalse(skill._converse_is_implemented) + self.assertFalse(skill.converse_is_implemented) skill.get_response('what do you want', validator=validator) skill._wait_response.assert_called_with(AnyCallable(), validator, AnyCallable(), -1) - self.assertFalse(skill._converse_is_implemented) + self.assertFalse(skill.converse_is_implemented) class TestMycroftSkillAskYesNo(TestCase): @@ -230,7 +230,7 @@ def test_ask_yesno_other(self): response = skill.ask_yesno('Do you like breakfast') self.assertEqual(response, 'I am a fish') - @mock.patch('ovos_workshop.skills.base.dig_for_message') + @mock.patch('ovos_workshop.skills.ovos.dig_for_message') def test_ask_yesno_german(self, dig_mock): """Check that when the skill is set to german it responds to "ja".""" # lang is session based, it comes from originating message in ovos-core