Rename audio/test_interface.py to test_utils.py

This is more inline with the tests that are performed in the file.

This also adds a test for stop_speaking
pull/2442/head
Åke Forslund 2019-12-28 22:05:03 +01:00
parent 9a36639ec7
commit d25a2b4293
1 changed files with 8 additions and 3 deletions

View File

@ -13,6 +13,8 @@
# limitations under the License.
#
import unittest
import unittest.mock as mock
from shutil import rmtree
from threading import Thread
from time import sleep
@ -22,9 +24,7 @@ from os.path import exists
import mycroft.audio
from mycroft.util import create_signal, check_for_signal
"""
Tests for public interface for audio interface
"""
"""Tests for public audio service utils."""
done_waiting = False
@ -58,6 +58,11 @@ class TestInterface(unittest.TestCase):
sleep(2)
self.assertTrue(done_waiting)
@mock.patch('mycroft.messagebus.send_func.send')
def test_stop_speaking(self, mock_send):
mycroft.audio.stop_speaking()
mock_send.assert_called_with('mycroft.audio.speech.stop')
if __name__ == "__main__":
unittest.main()