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_speakingpull/2442/head
parent
9a36639ec7
commit
d25a2b4293
|
@ -13,6 +13,8 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
import unittest
|
import unittest
|
||||||
|
import unittest.mock as mock
|
||||||
|
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
@ -22,9 +24,7 @@ from os.path import exists
|
||||||
import mycroft.audio
|
import mycroft.audio
|
||||||
from mycroft.util import create_signal, check_for_signal
|
from mycroft.util import create_signal, check_for_signal
|
||||||
|
|
||||||
"""
|
"""Tests for public audio service utils."""
|
||||||
Tests for public interface for audio interface
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
done_waiting = False
|
done_waiting = False
|
||||||
|
@ -58,6 +58,11 @@ class TestInterface(unittest.TestCase):
|
||||||
sleep(2)
|
sleep(2)
|
||||||
self.assertTrue(done_waiting)
|
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__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
Loading…
Reference in New Issue