test_models: check cruiseState.available (#24924)

* check available is true if enabled is true

* remove extra line
old-commit-hash: e45eb1bd28623571079122030392fa0fe03e7a42
This commit is contained in:
Shane Smiskol
2022-06-21 00:11:55 -07:00
committed by GitHub
parent 114546d6a6
commit bf4f8e0ca9
+1
View File
@@ -221,6 +221,7 @@ class TestCarModelBase(unittest.TestCase):
# TODO: check rest of panda's carstate (steering, ACC main on, etc.)
checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
checks['cruiseState'] += CS.cruiseState.enabled and not CS.cruiseState.available
# TODO: remove this exception once this mismatch is resolved
brake_pressed = CS.brakePressed