Skip to content

Commit

Permalink
buttons shouldn't cancel controls
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Jan 19, 2022
1 parent 727d7a9 commit 2b30206
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/safety/test_ford.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b30206

Please sign in to comment.