diff --git a/src/python/python_fmpi/src/config/__init__.py b/src/python/python_fmpi/src/config/__init__.py new file mode 100644 index 0000000..f8bf4e8 --- /dev/null +++ b/src/python/python_fmpi/src/config/__init__.py @@ -0,0 +1 @@ +__author__ = 'dev' diff --git a/src/python/python_fmpi/src/config/commands.py b/src/python/python_fmpi/src/config/commands.py new file mode 100644 index 0000000..f8bf4e8 --- /dev/null +++ b/src/python/python_fmpi/src/config/commands.py @@ -0,0 +1 @@ +__author__ = 'dev' diff --git a/src/python/python_fmpi/src/config/stream_list.py b/src/python/python_fmpi/src/config/stream_list.py new file mode 100644 index 0000000..9e47bd8 --- /dev/null +++ b/src/python/python_fmpi/src/config/stream_list.py @@ -0,0 +1,5 @@ +__author__ = 'dev' + += { + +} \ No newline at end of file diff --git a/src/python/python_fmpi/src/web_streams/__init__.py b/src/python/python_fmpi/src/web_streams/__init__.py new file mode 100644 index 0000000..f8bf4e8 --- /dev/null +++ b/src/python/python_fmpi/src/web_streams/__init__.py @@ -0,0 +1 @@ +__author__ = 'dev' diff --git a/src/python/python_fmpi/src/web_streams/web_stream_player.py b/src/python/python_fmpi/src/web_streams/web_stream_player.py new file mode 100644 index 0000000..f8bf4e8 --- /dev/null +++ b/src/python/python_fmpi/src/web_streams/web_stream_player.py @@ -0,0 +1 @@ +__author__ = 'dev' diff --git a/src/python/python_fmpi/test/config/test_commands.py b/src/python/python_fmpi/test/config/test_commands.py new file mode 100644 index 0000000..ee73c95 --- /dev/null +++ b/src/python/python_fmpi/test/config/test_commands.py @@ -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() diff --git a/src/python/python_fmpi/test/config/test_stream_list.py b/src/python/python_fmpi/test/config/test_stream_list.py new file mode 100644 index 0000000..ee73c95 --- /dev/null +++ b/src/python/python_fmpi/test/config/test_stream_list.py @@ -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() diff --git a/src/python/python_fmpi/test/web_streams/test_web_stream_player.py b/src/python/python_fmpi/test/web_streams/test_web_stream_player.py new file mode 100644 index 0000000..8f81ab1 --- /dev/null +++ b/src/python/python_fmpi/test/web_streams/test_web_stream_player.py @@ -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()