Skip to content

Commit 2c67253

Browse files
committed
fix: address review comments.
1 parent 614a3d4 commit 2c67253

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

optimizely/event/event_processor.py

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ def __init__(self,
9595
self.notification_center = notification_center
9696
self._current_batch = list()
9797

98+
if not validator.is_notification_center_valid(self.notification_center):
99+
self.logger.error(enums.Errors.INVALID_INPUT.format('notification_center'))
100+
self.notification_center = notification_center.NotificationCenter()
101+
98102
if start_on_init is True:
99103
self.start()
100104

tests/test_event_processor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def test_init__NaN_timeout_interval(self):
376376
self.assertEqual(self._event_processor.timeout_interval, timedelta(seconds=5))
377377
mock_config_logging.info.assert_called_with('Using default value for timeout_interval.')
378378

379-
def test_notification_center(self):
379+
def test_notification_center__on_log_event(self):
380380

381381
mock_event_dispatcher = mock.Mock()
382382
callback_hit = [False]

0 commit comments

Comments
 (0)