Skip to content

Commit 4c25eb0

Browse files
committed
Update TC_CGEN_2_5 to use Nullable type for TCUpdateDeadline validation
1 parent db74da6 commit 4c25eb0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/python_testing/TC_CGEN_2_5.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
import chip.clusters as Clusters
4040
from chip import ChipDeviceCtrl
41-
from chip.clusters.Attribute import ValueDecodeFailure
41+
from chip.clusters.Types import Nullable
4242
from chip.commissioning import ROOT_ENDPOINT_ID
4343
from chip.testing import matter_asserts
4444
from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main
@@ -117,10 +117,8 @@ async def test_TC_CGEN_2_5(self):
117117
)
118118
tc_update_deadline = response[ROOT_ENDPOINT_ID][Clusters.GeneralCommissioning][Clusters.GeneralCommissioning.Attributes.TCUpdateDeadline]
119119

120-
# Validate the value is of type Optional[uint32], e.g. either None or within the 32-bit range.
121-
if isinstance(tc_update_deadline, ValueDecodeFailure):
122-
asserts.assert_is_none(tc_update_deadline.TLVValue)
123-
else:
120+
# Validate the value is of type Optional[uint32], e.g. either Nullable or within the 32-bit range.
121+
if not isinstance(tc_update_deadline, Nullable):
124122
matter_asserts.assert_valid_uint32(tc_update_deadline, "TCUpdateDeadline exceeds uint32 range")
125123

126124
# Step 4: Verify TC feature flag in FeatureMap

0 commit comments

Comments
 (0)