Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 30, 2023
1 parent 7845941 commit da7d0d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/unittests/skills/test_mycroft_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions test/unittests/skills/test_mycroft_skill_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit da7d0d7

Please sign in to comment.