mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user