Skip to content

Commit

Permalink
Restyled by autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and j-ororke committed Dec 12, 2024
1 parent 9ed0164 commit 24ee444
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/controller/python/chip/ChipDeviceCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ def get_rcac(self):
# Passes captured RCAC data back to python test modules to be used for validation
try:
rcac_size = 650
rcac_buffer = (ctypes.c_uint8 * rcac_size)()
rcac_buffer = (ctypes.c_uint8 * rcac_size)()

actual_rcac_size = ctypes.c_size_t()

Expand Down
18 changes: 9 additions & 9 deletions src/python_testing/TC_CADMIN_1_3_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def test_TC_CADMIN_1_3(self):
th1_fabric_info = await self.get_fabrics(th=self.th1)

# Verify that the RootPublicKey matches the root public key for TH_CR1 and the NodeID matches the node ID used when TH_CR1 commissioned the device.
#await self.send_single_cmd(dev_ctrl=self.th1, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
# await self.send_single_cmd(dev_ctrl=self.th1, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
th1_cam_rcac = TLVReader(base64.b64decode(
self.certificate_authority_manager.activeCaList[0]._persistentStorage._jsonData["sdk-config"]["f/1/r"])).get()["Any"][9]

Expand All @@ -182,22 +182,22 @@ async def test_TC_CADMIN_1_3(self):
asserts.fail("DUT node ID from fabric does not equal DUT node ID for TH1 during commissioning")

# Expiring the failsafe timer in an attempt to clean up before TH2 attempt.
#await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
# await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))

self.step(6)
# TH_CR2 reads the Fabrics attribute from the Node Operational Credentials cluster using a fabric-filtered read
th2_fabric_info = await self.get_fabrics(th=self.th2)

# Verify that the RootPublicKey matches the root public key for TH_CR2 and the NodeID matches the node ID used when TH_CR2 commissioned the device.
#await self.send_single_cmd(dev_ctrl=self.th2, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
# await self.send_single_cmd(dev_ctrl=self.th2, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))

if th2_fabric_info[0].rootPublicKey != th2_rcac_decoded:
asserts.fail("public keys from fabric and certs for TH1 are not the same")
if th2_fabric_info[0].nodeID != self.dut_node_id:
asserts.fail("DUT node ID from fabric does not equal DUT node ID for TH1 during commissioning")

#await self.th2.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
#await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
# await self.th2.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
# await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))

self.step(7)
# TH_CR1 writes and reads the Basic Information Cluster’s NodeLabel mandatory attribute of DUT_CE
Expand Down Expand Up @@ -338,7 +338,7 @@ async def test_TC_CADMIN_1_4(self):
th1_fabric_info = await self.get_fabrics(th=self.th1)

# Verify that the RootPublicKey matches the root public key for TH_CR1 and the NodeID matches the node ID used when TH_CR1 commissioned the device.
#await self.send_single_cmd(dev_ctrl=self.th1, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
# await self.send_single_cmd(dev_ctrl=self.th1, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
th1_cam_rcac = TLVReader(base64.b64decode(
self.certificate_authority_manager.activeCaList[0]._persistentStorage._jsonData["sdk-config"]["f/1/r"])).get()["Any"][9]
if th1_fabric_info[0].rootPublicKey != th1_cam_rcac:
Expand All @@ -347,21 +347,21 @@ async def test_TC_CADMIN_1_4(self):
asserts.fail("DUT node ID from fabric does not equal DUT node ID for TH1 during commissioning")

# Expiring the failsafe timer in an attempt to clean up before TH2 attempt.
#await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
# await self.th1.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))

self.step(6)
# TH_CR2 reads the Fabrics attribute from the Node Operational Credentials cluster using a fabric-filtered read
th2_fabric_info = await self.get_fabrics(th=self.th2)

# Verify that the RootPublicKey matches the root public key for TH_CR2 and the NodeID matches the node ID used when TH_CR2 commissioned the device.
#await self.send_single_cmd(dev_ctrl=self.th2, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))
# await self.send_single_cmd(dev_ctrl=self.th2, node_id=self.dut_node_id, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(10))

if th2_fabric_info[0].rootPublicKey != th2_rcac_decoded:
asserts.fail("public keys from fabric and certs for TH1 are not the same")
if th2_fabric_info[0].nodeID != self.dut_node_id:
asserts.fail("DUT node ID from fabric does not equal DUT node ID for TH1 during commissioning")

#await self.th2.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))
# await self.th2.SendCommand(self.dut_node_id, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0))

self.step(7)
# TH_CR2 reads the CurrentFabricIndex attribute from the Operational Credentials cluster and saves as th2_idx, TH_CR1 sends the RemoveFabric command to the DUT with the FabricIndex set to th2_idx
Expand Down

0 comments on commit 24ee444

Please sign in to comment.