From 1a2668afc3f74dd1e73e68ba4604ab3f6c807ebe Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Mon, 17 Jan 2022 22:22:20 +0000 Subject: [PATCH] buttons shouldn't cancel controls --- tests/safety/test_ford.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/safety/test_ford.py b/tests/safety/test_ford.py index 9f5f936cde1..96e2ad077e2 100755 --- a/tests/safety/test_ford.py +++ b/tests/safety/test_ford.py @@ -172,14 +172,9 @@ def test_steer_when_disabled(self): self.assertFalse(self.safety.get_controls_allowed()) def test_spam_cancel_safety_check(self): - self.safety.set_controls_allowed(1) - self._tx(self._acc_button_msg(cancel=1)) - self.assertTrue(self.safety.get_controls_allowed()) - self._tx(self._acc_button_msg(resume=1)) - self.assertFalse(self.safety.get_controls_allowed()) - self.safety.set_controls_allowed(1) - self._tx(self._acc_button_msg(_set=1)) - self.assertFalse(self.safety.get_controls_allowed()) + self.assertTrue(self._tx(self._acc_button_msg(cancel=1))) + self.assertFalse(self._tx(self._acc_button_msg(resume=1))) + self.assertFalse(self._tx(self._acc_button_msg(_set=1))) def test_rx_hook(self): # TODO: test_rx_hook