Skip to content

Commit 00acce5

Browse files
committed
Add type validation for TCAcceptedVersion and TCAcknowledgements
1 parent 4c25eb0 commit 00acce5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/python_testing/TC_CGEN_2_5.py

+2
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ async def test_TC_CGEN_2_5(self):
173173
response = await commissioner.ReadAttribute(nodeid=self.dut_node_id, attributes=[(ROOT_ENDPOINT_ID, Clusters.GeneralCommissioning.Attributes.TCAcceptedVersion)])
174174
accepted_version = response[ROOT_ENDPOINT_ID][Clusters.GeneralCommissioning][Clusters.GeneralCommissioning.Attributes.TCAcceptedVersion]
175175
asserts.assert_equal(accepted_version, tc_version_to_simulate, "TCAcceptedVersion does not match expected value.")
176+
matter_asserts.assert_valid_uint16(accepted_version, "TCAcceptedVersion is not a uint16 type.")
176177

177178
# Step 10: Verify TCAcknowledgements
178179
self.step(10)
179180
response = await commissioner.ReadAttribute(nodeid=self.dut_node_id, attributes=[(ROOT_ENDPOINT_ID, Clusters.GeneralCommissioning.Attributes.TCAcknowledgements)])
180181
acknowledgements = response[ROOT_ENDPOINT_ID][Clusters.GeneralCommissioning][Clusters.GeneralCommissioning.Attributes.TCAcknowledgements]
181182
asserts.assert_equal(acknowledgements, tc_user_response_to_simulate, "TCAcknowledgements does not match expected value.")
183+
matter_asserts.assert_valid_uint16(accepted_version, "TCAcknowledgements is not a map16 type.")
182184

183185
# Step 11: Verify TCMinRequiredVersion
184186
self.step(11)

0 commit comments

Comments
 (0)