Skip to content

Commit

Permalink
Add type validation for TCAcceptedVersion and TCAcknowledgements
Browse files Browse the repository at this point in the history
  • Loading branch information
swan-amazon committed Feb 8, 2025
1 parent 4c25eb0 commit 00acce5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python_testing/TC_CGEN_2_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 00acce5

Please sign in to comment.