From cd7ad79ea355a462631031ea243cb948ed37e655 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:55:34 -0700 Subject: [PATCH] Add test case to validate available languages (#21) * Add test case to validate available languages * Fix typo in test case Resolve variable name warning --------- Co-authored-by: Daniel McKnight --- tests/test_stt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_stt.py b/tests/test_stt.py index 6a017f6..14aebb8 100644 --- a/tests/test_stt.py +++ b/tests/test_stt.py @@ -52,6 +52,12 @@ def test_get_stt(self): result = self.stt.execute(audio) self.assertIn(transcription, result) + def test_available_languages(self): + langs = self.stt.available_languages + self.assertIsInstance(langs, set) + self.assertTrue(all((isinstance(lang, str) for lang in langs))) + self.assertIn("en", langs) + if __name__ == '__main__': unittest.main()