FwQueryConfig: test request lists (#28741)

* request callbacks

* support in IsoTpParallelQuery

* tiny bit simpler

* shorter lines

* need to check length again, could return empty list

* takes in prev response

* typing

* test

* only test

* simple test

* revert this

* subtest!
old-commit-hash: 16203cc856
beeps
Shane Smiskol 2 years ago committed by GitHub
parent 7f406a5ca8
commit 017ad73096
  1. 7
      selfdrive/car/tests/test_fw_fingerprint.py

@ -160,6 +160,13 @@ class TestFwFingerprint(unittest.TestCase):
self.assertFalse(len(whitelisted_ecus) and len(ecus_not_whitelisted),
f'{brand.title()}: ECUs not in any FW query whitelists: {ecu_strings}')
def test_fw_requests(self):
# Asserts equal length request and response lists
for brand, config in FW_QUERY_CONFIGS.items():
with self.subTest(brand=brand):
for request_obj in config.requests:
self.assertEqual(len(request_obj.request), len(request_obj.response))
class TestFwFingerprintTiming(unittest.TestCase):
N: int = 5

Loading…
Cancel
Save