From 4dd83ff3decb6b1bfd76577a2900cc14e519ce22 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 14 Nov 2023 00:02:42 +0000 Subject: [PATCH] Restyled by autopep8 --- src/python_testing/TestGroupTableReports.py | 30 ++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/python_testing/TestGroupTableReports.py b/src/python_testing/TestGroupTableReports.py index ab71fe8e2bf556..a75fa5f2e1c189 100644 --- a/src/python_testing/TestGroupTableReports.py +++ b/src/python_testing/TestGroupTableReports.py @@ -25,6 +25,7 @@ from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts + class AttributeChangeCallback: def __init__(self, expected_attribute: ClusterObjects.ClusterAttributeDescriptor, output: queue.Queue): self._output = output @@ -49,18 +50,19 @@ def WaitForAttributeReport(q: queue.Queue, expected_attribute: ClusterObjects.Cl except KeyError: asserts.fail("Attribute not found in returned report") + class TestGroupTableReports(MatterBaseTest): @async_test_body async def test_group_table_reports(self): self.print_step(1, "Commissioning, already done") - #TODO : Verify if they are needed + # TODO : Verify if they are needed fabric_admin = self.certificate_authority_manager.activeCaList[0].adminList[0] TH1_nodeid = self.matter_test_config.controller_node_id - #end TODO + # end TODO - self.TH1= self.default_controller + self.TH1 = self.default_controller self.kGroupKeyset1 = 0x01a1 @@ -77,7 +79,6 @@ async def test_group_table_reports(self): await self.TH1.SendCommand(self.dut_node_id, 0, Clusters.GroupKeyManagement.Commands.KeySetWrite(self.groupKey)) - self.kGroup1 = 0x0101 self.kGroup2 = 0x0102 self.kGroup3 = 0x0103 @@ -86,20 +87,19 @@ async def test_group_table_reports(self): mapping_structs: List[Clusters.GroupKeyManagement.Structs.GroupKeyMapStruct] = [] mapping_structs.append(Clusters.GroupKeyManagement.Structs.GroupKeyMapStruct( - groupId=self.kGroup1, - groupKeySetID=self.kGroupKeyset1, - fabricIndex=1)) - - mapping_structs.append(Clusters.GroupKeyManagement.Structs.GroupKeyMapStruct( - groupId=self.kGroup2, - groupKeySetID=self.kGroupKeyset1, - fabricIndex=1)) + groupId=self.kGroup1, + groupKeySetID=self.kGroupKeyset1, + fabricIndex=1)) mapping_structs.append(Clusters.GroupKeyManagement.Structs.GroupKeyMapStruct( - groupId=self.kGroup3, - groupKeySetID=self.kGroupKeyset1, - fabricIndex=1)) + groupId=self.kGroup2, + groupKeySetID=self.kGroupKeyset1, + fabricIndex=1)) + mapping_structs.append(Clusters.GroupKeyManagement.Structs.GroupKeyMapStruct( + groupId=self.kGroup3, + groupKeySetID=self.kGroupKeyset1, + fabricIndex=1)) result = await self.TH1.WriteAttribute(self.dut_node_id, [(0, Clusters.GroupKeyManagement.Attributes.GroupKeyMap(mapping_structs))]) asserts.assert_equal(result[0].Status, Status.Success, "GroupKeyMap write failed")