Skip to content
Snippets Groups Projects
Commit 11f8e6e2 authored by Chris Pastl's avatar Chris Pastl
Browse files

test: remove logger and class members

parent 0fc96726
No related branches found
No related tags found
1 merge request!40Fix retry connect stream
...@@ -17,14 +17,13 @@ ...@@ -17,14 +17,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import threading
import unittest import unittest
from time import sleep from time import sleep
from aura_engine.base.config import AuraConfig from aura_engine.base.config import AuraConfig
from aura_engine.base.logger import AuraLogger from aura_engine.base.logger import AuraLogger
from aura_engine.base.utils import SimpleUtil as SU from aura_engine.base.utils import SimpleUtil as SU
from aura_engine.control import EngineExecutor from aura_engine.core.channels import PlayoutStatusResponse
from aura_engine.engine import Engine, Player from aura_engine.engine import Engine, Player
from aura_engine.events import EngineEventDispatcher from aura_engine.events import EngineEventDispatcher
from aura_engine.scheduling.domain import Playlist, PlaylistItem, Show, Timeslot from aura_engine.scheduling.domain import Playlist, PlaylistItem, Show, Timeslot
...@@ -58,24 +57,24 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase): ...@@ -58,24 +57,24 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase):
Testing the scheduling utils. Testing the scheduling utils.
""" """
config: AuraConfig
engine: Engine engine: Engine
dispatcher: EngineEventDispatcher
player: Player
client: PlayoutClientMock client: PlayoutClientMock
# Setup and teardown # Setup and teardown
def setUp(self): def setUp(self):
self.config = AuraConfig.instance.config config = AuraConfig.instance.config
AuraLogger(self.config, "engine") AuraLogger(config)
self.engine = Engine.get_instance()
self.dispatcher = EngineEventDispatcher(engine=self.engine) engine = Engine.get_instance()
self.client = PlayoutClientMock(event_dispatcher=self.dispatcher) dispatcher = EngineEventDispatcher(engine=engine)
self.player = Player(self.client, self.dispatcher) client = PlayoutClientMock(event_dispatcher=dispatcher)
self.engine.event_dispatcher = self.dispatcher engine.event_dispatcher = dispatcher
self.engine.player = self.player engine.player = Player(client, dispatcher)
self.engine = engine
self.client = client
def tearDown(self): def tearDown(self):
pass pass
...@@ -151,6 +150,8 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase): ...@@ -151,6 +150,8 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase):
def test_play_active_invalid_source(self): def test_play_active_invalid_source(self):
print(self._testMethodName) print(self._testMethodName)
self.client.stream_status = PlayoutStatusResponse.STREAM_STATUS_POLLING
# Construct the scheduler # Construct the scheduler
scheduler = AuraScheduler(self.engine) scheduler = AuraScheduler(self.engine)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment