add web stream player
This commit is contained in:
1
src/python/python_fmpi/src/config/__init__.py
Normal file
1
src/python/python_fmpi/src/config/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
1
src/python/python_fmpi/src/config/commands.py
Normal file
1
src/python/python_fmpi/src/config/commands.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
5
src/python/python_fmpi/src/config/stream_list.py
Normal file
5
src/python/python_fmpi/src/config/stream_list.py
Normal file
@@ -0,0 +1,5 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
= {
|
||||
|
||||
}
|
||||
1
src/python/python_fmpi/src/web_streams/__init__.py
Normal file
1
src/python/python_fmpi/src/web_streams/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
@@ -0,0 +1 @@
|
||||
__author__ = 'dev'
|
||||
12
src/python/python_fmpi/test/config/test_commands.py
Normal file
12
src/python/python_fmpi/test/config/test_commands.py
Normal file
@@ -0,0 +1,12 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
12
src/python/python_fmpi/test/config/test_stream_list.py
Normal file
12
src/python/python_fmpi/test/config/test_stream_list.py
Normal file
@@ -0,0 +1,12 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,34 @@
|
||||
__author__ = 'dev'
|
||||
|
||||
import unittest
|
||||
from web_streams.web_stream_player import WebStreamPlayer
|
||||
|
||||
|
||||
class TestWebStreamPlayer(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.__player = WebStreamPlayer()
|
||||
self.__stream_name = "skaworld"
|
||||
self.__wrong_stream_name = "skawrld"
|
||||
|
||||
def tearDown(self):
|
||||
self.__player.stop_stream()
|
||||
|
||||
def test_play_stream(self):
|
||||
self.__player.play_stream(self.__stream_name)
|
||||
self.assertEqual(self.__player.get_current_stream_name(), self.__stream_name)
|
||||
|
||||
def test_play_stream_error_wrong_stream_name(self):
|
||||
self.__player.play_stream(self.__wrong_stream_name)
|
||||
self.assertEqual(self.__player.get_current_stream_name(), None)
|
||||
self.assertTrue(True)
|
||||
|
||||
def test_stop_stream(self):
|
||||
self.__player.play_stream(self.__stream_name)
|
||||
self.assertEqual(self.__player.get_current_stream_name(), self.__stream_name)
|
||||
self.__player.stop_stream()
|
||||
self.assertEqual(self.__player.get_current_stream_name(), None)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user