|
|
@ -99,6 +99,15 @@ class TestFwFingerprint(unittest.TestCase): |
|
|
|
with self.subTest(): |
|
|
|
with self.subTest(): |
|
|
|
self.fail(f"Brands do not implement FW_QUERY_CONFIG: {brand_versions - brand_configs}") |
|
|
|
self.fail(f"Brands do not implement FW_QUERY_CONFIG: {brand_versions - brand_configs}") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_fuzzy_fingerprint_config(self): |
|
|
|
|
|
|
|
for brand, config in FW_QUERY_CONFIGS.items(): |
|
|
|
|
|
|
|
with self.subTest(brand=brand): |
|
|
|
|
|
|
|
if config.fuzzy_get_platform_codes is None: |
|
|
|
|
|
|
|
self.assertEqual(config.fuzzy_min_match_count, 2, "Cannot override minimum match count without full config") |
|
|
|
|
|
|
|
self.assertEqual(len(config.fuzzy_ecus), 0, "Cannot specify fuzzy ECUs without full config") |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
self.assertGreater(len(config.fuzzy_ecus), 0, "Need to specify fuzzy ECUs") |
|
|
|
|
|
|
|
|
|
|
|
def test_fw_request_ecu_whitelist(self): |
|
|
|
def test_fw_request_ecu_whitelist(self): |
|
|
|
for brand, config in FW_QUERY_CONFIGS.items(): |
|
|
|
for brand, config in FW_QUERY_CONFIGS.items(): |
|
|
|
with self.subTest(brand=brand): |
|
|
|
with self.subTest(brand=brand): |
|
|
|