From 00acce5fc3ef880109fd0338a07a2c501643b8a7 Mon Sep 17 00:00:00 2001 From: James Swan Date: Sat, 8 Feb 2025 01:28:50 +0000 Subject: [PATCH] Add type validation for TCAcceptedVersion and TCAcknowledgements --- src/python_testing/TC_CGEN_2_5.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python_testing/TC_CGEN_2_5.py b/src/python_testing/TC_CGEN_2_5.py index 7a55dcf35b7d73..f6d6043958b005 100644 --- a/src/python_testing/TC_CGEN_2_5.py +++ b/src/python_testing/TC_CGEN_2_5.py @@ -173,12 +173,14 @@ async def test_TC_CGEN_2_5(self): response = await commissioner.ReadAttribute(nodeid=self.dut_node_id, attributes=[(ROOT_ENDPOINT_ID, Clusters.GeneralCommissioning.Attributes.TCAcceptedVersion)]) accepted_version = response[ROOT_ENDPOINT_ID][Clusters.GeneralCommissioning][Clusters.GeneralCommissioning.Attributes.TCAcceptedVersion] asserts.assert_equal(accepted_version, tc_version_to_simulate, "TCAcceptedVersion does not match expected value.") + matter_asserts.assert_valid_uint16(accepted_version, "TCAcceptedVersion is not a uint16 type.") # Step 10: Verify TCAcknowledgements self.step(10) response = await commissioner.ReadAttribute(nodeid=self.dut_node_id, attributes=[(ROOT_ENDPOINT_ID, Clusters.GeneralCommissioning.Attributes.TCAcknowledgements)]) acknowledgements = response[ROOT_ENDPOINT_ID][Clusters.GeneralCommissioning][Clusters.GeneralCommissioning.Attributes.TCAcknowledgements] asserts.assert_equal(acknowledgements, tc_user_response_to_simulate, "TCAcknowledgements does not match expected value.") + matter_asserts.assert_valid_uint16(accepted_version, "TCAcknowledgements is not a map16 type.") # Step 11: Verify TCMinRequiredVersion self.step(11)