mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 13:32:05 +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: 16203cc856f5f1fed779f34f94234d3eed9d978c
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