Use real vehicle params in optional feature tests

This commit is contained in:
firestar5683
2026-11-21 12:09:16 -06:00
parent 4218e46640
commit 193835d88d
2 changed files with 3 additions and 3 deletions
@@ -4,6 +4,7 @@ from unittest.mock import Mock, patch
import pytest
from opendbc.car.structs import CarParams
from opendbc.car.toyota.interface import CarInterface
from opendbc.car.toyota.values import CAR
from openpilot.common.params import Params
@@ -32,8 +33,7 @@ def test_generic_admission_is_brand_independent_and_stock_is_display_only(tmp_pa
params = Params(str(tmp_path))
params.put_bool('CurveSpeedController', True, block=True)
params.put_bool('SpeedLimitController', True, block=True)
cp = NS(brand=brand, carFingerprint=brand + '_native', openpilotLongitudinalControl=True,
pcmCruise=True, passive=False, dashcamOnly=False, notCar=False)
cp = CarParams(brand=brand, carFingerprint=brand + '_native', openpilotLongitudinalControl=True, pcmCruise=True)
for feature in ('conditional', 'curve', 'profile', 'slc', 'vision'):
assert enabled(params, cp, feature, {})
assert diagnostic_choice_enabled({}, cp)
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "b5621033298a263a2cfc065be1786561de9cf223d4dc72180e43d11fd1e928c3", "schema_version": 1}
{"protected_inventory_sha256": "01001c20e7af15c0ea7bdb1253f8b6389d340741cd5847fc8edee37bfa1f9e77", "schema_version": 1}