diff --git a/tests/safety/common.py b/tests/safety/common.py index 0c2c4c83..54f08594 100644 --- a/tests/safety/common.py +++ b/tests/safety/common.py @@ -865,15 +865,15 @@ class PandaSafetyTest(PandaSafetyTestBase): self.assertFalse(self.safety.get_vehicle_moving()) # not moving - self.safety.safety_rx_hook(self._vehicle_moving_msg(0)) + self._rx(self._vehicle_moving_msg(0)) self.assertFalse(self.safety.get_vehicle_moving()) # speed is at threshold - self.safety.safety_rx_hook(self._vehicle_moving_msg(self.STANDSTILL_THRESHOLD)) + self._rx(self._vehicle_moving_msg(self.STANDSTILL_THRESHOLD)) self.assertFalse(self.safety.get_vehicle_moving()) # past threshold - self.safety.safety_rx_hook(self._vehicle_moving_msg(self.STANDSTILL_THRESHOLD + 1)) + self._rx(self._vehicle_moving_msg(self.STANDSTILL_THRESHOLD + 1)) self.assertTrue(self.safety.get_vehicle_moving()) def test_tx_hook_on_wrong_safety_mode(self): diff --git a/tests/safety/hyundai_common.py b/tests/safety/hyundai_common.py index fde8f77c..ad938097 100644 --- a/tests/safety/hyundai_common.py +++ b/tests/safety/hyundai_common.py @@ -141,10 +141,10 @@ class HyundaiLongitudinalBase(common.LongitudinalAccelSafetyTest): addr, bus = self.DISABLED_ECU_UDS_MSG tester_present = libpanda_py.make_CANPacket(addr, bus, b"\x02\x3E\x80\x00\x00\x00\x00\x00") - self.assertTrue(self.safety.safety_tx_hook(tester_present)) + self.assertTrue(self._tx(tester_present)) not_tester_present = libpanda_py.make_CANPacket(addr, bus, b"\x03\xAA\xAA\x00\x00\x00\x00\x00") - self.assertFalse(self.safety.safety_tx_hook(not_tester_present)) + self.assertFalse(self._tx(not_tester_present)) def test_disabled_ecu_alive(self): """ diff --git a/tests/safety/test_honda.py b/tests/safety/test_honda.py index 8e6bed0f..16de6e57 100755 --- a/tests/safety/test_honda.py +++ b/tests/safety/test_honda.py @@ -297,7 +297,7 @@ class TestHondaNidecSafetyBase(HondaBase): for pcm_gas in range(0, 255): for pcm_speed in range(0, 100): send = pcm_gas <= self.MAX_GAS if controls_allowed else pcm_gas == 0 and pcm_speed == 0 - self.assertEqual(send, self.safety.safety_tx_hook(self._send_acc_hud_msg(pcm_gas, pcm_speed))) + self.assertEqual(send, self._tx(self._send_acc_hud_msg(pcm_gas, pcm_speed))) def test_fwd_hook(self): # normal operation, not forwarding AEB @@ -483,10 +483,10 @@ class TestHondaBoschLongSafety(HondaButtonEnableBase, TestHondaBoschSafetyBase): def test_diagnostics(self): tester_present = libpanda_py.make_CANPacket(0x18DAB0F1, self.PT_BUS, b"\x02\x3E\x80\x00\x00\x00\x00\x00") - self.assertTrue(self.safety.safety_tx_hook(tester_present)) + self.assertTrue(self._tx(tester_present)) not_tester_present = libpanda_py.make_CANPacket(0x18DAB0F1, self.PT_BUS, b"\x03\xAA\xAA\x00\x00\x00\x00\x00") - self.assertFalse(self.safety.safety_tx_hook(not_tester_present)) + self.assertFalse(self._tx(not_tester_present)) def test_radar_alive(self): # If the radar knockout failed, make sure the relay malfunction is shown @@ -500,7 +500,7 @@ class TestHondaBoschLongSafety(HondaButtonEnableBase, TestHondaBoschSafetyBase): accel = 0 if gas < 0 else gas / 1000 self.safety.set_controls_allowed(controls_allowed) send = gas <= self.MAX_GAS if controls_allowed else gas == self.NO_GAS - self.assertEqual(send, self.safety.safety_tx_hook(self._send_gas_brake_msg(gas, accel)), (controls_allowed, gas, accel)) + self.assertEqual(send, self._tx(self._send_gas_brake_msg(gas, accel)), (controls_allowed, gas, accel)) def test_brake_safety_check(self): for controls_allowed in [True, False]: