diff --git a/mpf/tests/test_BallSearch.py b/mpf/tests/test_BallSearch.py index 0301cc22e..22e715f9d 100644 --- a/mpf/tests/test_BallSearch.py +++ b/mpf/tests/test_BallSearch.py @@ -1,3 +1,4 @@ +from mpf.core.placeholder_manager import NativeTypeTemplate from mpf.tests.MpfGameTestCase import MpfGameTestCase from unittest.mock import MagicMock @@ -16,7 +17,7 @@ def get_platform(self): return 'smart_virtual' def test_ball_search_does_not_start_when_disabled(self): - self.machine.playfields["playfield"].config['enable_ball_search'] = False + self.machine.playfields["playfield"].config['enable_ball_search'] = NativeTypeTemplate(False, self.machine) self.machine.ball_controller.num_balls_known = 0 self.machine.switch_controller.process_switch("s_ball_switch1", 1) @@ -34,14 +35,14 @@ def test_ball_search_does_not_start_when_disabled(self): self.assertFalse(self.machine.ball_devices['playfield'].ball_search.enabled) self.assertFalse(self.machine.ball_devices['playfield'].ball_search.started) - self.machine.playfields["playfield"].config['enable_ball_search'] = None + self.machine.playfields["playfield"].config['enable_ball_search'] = NativeTypeTemplate(None, self.machine) self.machine.config['mpf']['default_ball_search'] = True self.machine.ball_devices['playfield'].ball_search.enable() self.assertTrue(self.machine.ball_devices['playfield'].ball_search.enabled) self.machine.ball_devices['playfield'].ball_search.disable() self.assertFalse(self.machine.ball_devices['playfield'].ball_search.enabled) - self.machine.playfields["playfield"].config['enable_ball_search'] = None + self.machine.playfields["playfield"].config['enable_ball_search'] = NativeTypeTemplate(None, self.machine) self.machine.config['mpf']['default_ball_search'] = False self.machine.ball_devices['playfield'].ball_search.enable() self.assertFalse(self.machine.ball_devices['playfield'].ball_search.enabled) diff --git a/mpf/tests/test_DropTargets.py b/mpf/tests/test_DropTargets.py index 7e84c3fc4..0536397d7 100644 --- a/mpf/tests/test_DropTargets.py +++ b/mpf/tests/test_DropTargets.py @@ -1,3 +1,4 @@ +from mpf.core.placeholder_manager import NativeTypeTemplate from mpf.tests.MpfFakeGameTestCase import MpfFakeGameTestCase from unittest.mock import MagicMock, patch @@ -323,7 +324,7 @@ def test_drop_target_ignore_ms(self): def test_drop_target_ignore_ms_ball_search(self): - self.machine.playfields["playfield"].config['enable_ball_search'] = True + self.machine.playfields["playfield"].config['enable_ball_search'] = NativeTypeTemplate(True, self.machine) self.machine.playfields["playfield"].balls += 1 self.mock_event('drop_target_center1_down') diff --git a/mpf/tests/test_Stepper.py b/mpf/tests/test_Stepper.py index 4c626d15a..6ba45276e 100644 --- a/mpf/tests/test_Stepper.py +++ b/mpf/tests/test_Stepper.py @@ -1,3 +1,4 @@ +from mpf.core.placeholder_manager import NativeTypeTemplate from unittest.mock import MagicMock from mpf.tests.MpfTestCase import MpfTestCase @@ -142,7 +143,7 @@ def test_stepper_events(self): def test_ball_search(self): stepper = self.machine.steppers["linearAxis_stepper"] - self.machine.playfields["playfield"].config['enable_ball_search'] = True + self.machine.playfields["playfield"].config['enable_ball_search'] = NativeTypeTemplate(True, self.machine) self.machine.playfields["playfield"].balls += 1 event_future = self.machine.events.wait_for_event("stepper_linearAxis_stepper_ready")