Skip to content

Commit c5acd88

Browse files
committed
add stt unittests
1 parent de07f61 commit c5acd88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/unittests/stt/test_stt.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@
2121

2222

2323
class TestSTT(unittest.TestCase):
24+
def test_factory(self):
25+
config = {'module': 'mycroft',
26+
'mycroft': {'uri': 'https://test.com'}}
27+
stt = mycroft.stt.STTFactory.create(config)
28+
self.assertEqual(type(stt), mycroft.stt.MycroftSTT)
29+
30+
config = {'stt': config}
31+
stt = mycroft.stt.STTFactory.create(config)
32+
self.assertEqual(type(stt), mycroft.stt.MycroftSTT)
33+
2434
@patch.object(Configuration, 'get')
25-
def test_factory(self, mock_get):
35+
def test_factory_from_config(self, mock_get):
2636
mycroft.stt.STTApi = MagicMock()
2737
config = base_config()
2838
config.merge(

0 commit comments

Comments
 (0)