Test: ELM327 GM camera diagnostic address with malformed length (#2583)

test GM camera diagnostic address with malformed length
This commit is contained in:
Shengming Yuan
2025-07-29 12:31:59 -04:00
committed by GitHub
parent bfa0891c88
commit 9649b65d45

View File

@@ -40,6 +40,9 @@ class TestElm327(TestDefaultRxHookBase):
should_tx = (byte >> 4) <= 3
self.assertEqual(should_tx, self._tx(common.make_msg(0, GM_CAMERA_DIAG_ADDR, dat=bytes([byte] * 8))))
# test GM camera diagnostic address with malformed length
self.assertEqual(False, self._tx(common.make_msg(0, GM_CAMERA_DIAG_ADDR, dat=bytes([0x00] * 7))))
def test_tx_hook_on_wrong_safety_mode(self):
# No point, since we allow many diagnostic addresses
pass