From efe952a6d8d8b4c1bc7a262efd250c4e58af37e3 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 21 Aug 2024 11:30:49 +0000 Subject: [PATCH] Restyled by autopep8 --- src/python_testing/TC_DRLK_2_9.py | 586 +++++++++++++++--------------- 1 file changed, 293 insertions(+), 293 deletions(-) diff --git a/src/python_testing/TC_DRLK_2_9.py b/src/python_testing/TC_DRLK_2_9.py index 1c9fa1e8195981..a8300c56dc7e12 100644 --- a/src/python_testing/TC_DRLK_2_9.py +++ b/src/python_testing/TC_DRLK_2_9.py @@ -43,81 +43,82 @@ cluster = Clusters.DoorLock -class TC_DRLK_2_9(MatterBaseTest,DRLK_COMMON): +class TC_DRLK_2_9(MatterBaseTest, DRLK_COMMON): def steps_TC_DRLK_2_9(self) -> list[TestStep]: steps = [ - - TestStep("1", "TH reads NumberOfTotalUsersSupported attribute.","Verify that TH is able to read the attribute successfully."), - TestStep("2a", "TH sends SetUser Command to DUT.","Verify that TH is able to read the attribute successfully."), - TestStep("2b"," TH reads MinPINCodeLength attribute .", - "Verify that TH is able to read the attribute successfully."), - TestStep("2c","TH reads MaxPINCodeLength attribute.", - "Verify that TH is able to read the attribute successfully."), - TestStep("2d","TH reads MinRFIDCodeLength attribute.", + + TestStep("1", "TH reads NumberOfTotalUsersSupported attribute.", + "Verify that TH is able to read the attribute successfully."), + TestStep("2a", "TH sends SetUser Command to DUT.", "Verify that TH is able to read the attribute successfully."), + TestStep("2b", " TH reads MinPINCodeLength attribute .", + "Verify that TH is able to read the attribute successfully."), + TestStep("2c", "TH reads MaxPINCodeLength attribute.", "Verify that TH is able to read the attribute successfully."), - TestStep("2e","TH reads MaxRFIDCodeLength attribute.", - "Verify that TH is able to read the attribute successfully."), - TestStep("2f","TH sends SetCredential Command to DUT.", + TestStep("2d", "TH reads MinRFIDCodeLength attribute.", + "Verify that TH is able to read the attribute successfully."), + TestStep("2e", "TH reads MaxRFIDCodeLength attribute.", + "Verify that TH is able to read the attribute successfully."), + TestStep("2f", "TH sends SetCredential Command to DUT.", "Verify that the DUT responds with SetCredentialResponse command with Status SUCCESS."), - TestStep("3","TH sends GetCredentialStatus Command .", + TestStep("3", "TH sends GetCredentialStatus Command .", "Verify that the DUT responds with GetCredentialStatusResponse Command ."), - TestStep("4","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status INVALID_COMMAND."), - TestStep("5","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE."), - TestStep("6a","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE or OCCUPIED."), - TestStep("6b","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE or OCCUPIED."), - TestStep("7","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status INVALID_COMMAND."), - TestStep("8","TH sends ClearCredential Command to DUT.", + TestStep("4", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status INVALID_COMMAND."), + TestStep("5", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE."), + TestStep("6a", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE or OCCUPIED."), + TestStep("6b", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status DUPLICATE or OCCUPIED."), + TestStep("7", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status INVALID_COMMAND."), + TestStep("8", "TH sends ClearCredential Command to DUT.", "Verify that the DUT sends SUCCESS response."), - TestStep("9a","TH sends GetCredentialStatus command to DUT ", + TestStep("9a", "TH sends GetCredentialStatus command to DUT ", "Verify that the DUT responds with GetCredentialStatusResponse Command."), - TestStep("9b","TH sends ClearUser Command to DUT.", + TestStep("9b", "TH sends ClearUser Command to DUT.", "Verify that the DUT sends SUCCESS response"), - TestStep("10","TH sends SetUser Command to DUT.", + TestStep("10", "TH sends SetUser Command to DUT.", "Verify that the DUT sends SUCCESS response."), - TestStep("11","TH sends SetCredential Command to DUT.", - "Verify that the DUT responds with SetCredentialResponse command with Status SUCCESS."), - TestStep("12a","TH sends ClearCredential Command to DUT.", - " Verify that the DUT sends SUCCESS response."), - TestStep("13"," TH sends GetCredentialStatus Command.", + TestStep("11", "TH sends SetCredential Command to DUT.", + "Verify that the DUT responds with SetCredentialResponse command with Status SUCCESS."), + TestStep("12a", "TH sends ClearCredential Command to DUT.", + " Verify that the DUT sends SUCCESS response."), + TestStep("13", " TH sends GetCredentialStatus Command.", "Verify that the DUT responds with GetCredentialStatusResponse Command with credentialExists=FALSE."), - TestStep("14a","TH sends ClearCredential Command to DUT", + TestStep("14a", "TH sends ClearCredential Command to DUT", "if {PICS_SF_ALIRO} verify that the DUT sends a SUCCESS response else DUT sends an INVALID_COMMAND response."), - TestStep("14b","TH sends ClearCredential Command to DUT with Invalid Credential Type.", + TestStep("14b", "TH sends ClearCredential Command to DUT with Invalid Credential Type.", "Verify that the DUT sends an INVALID_COMMAND."), - TestStep("14c","TH sends ClearUser Command to DUT to clear all the users.", + TestStep("14c", "TH sends ClearUser Command to DUT to clear all the users.", "Verify that the DUT sends SUCCESS response."), - TestStep("15a","TH reads NumberOfCredentialsSupportedPerUser attribute from DUT.", + TestStep("15a", "TH reads NumberOfCredentialsSupportedPerUser attribute from DUT.", "Verify that TH is able to read the attribute successfully."), - TestStep("15b","TH sends SetUser Command to DUT.", + TestStep("15b", "TH sends SetUser Command to DUT.", "Verify that the DUT sends SUCCESS response."), - TestStep("15c","TH sends SetCredential Command to DUT.", + TestStep("15c", "TH sends SetCredential Command to DUT.", "Verify that the DUT sends SetCredentialResponse command with Status SUCCESS."), - TestStep("15d"," TH sends SetCredential Command with CredentialIndex as 'max-num-credential-user'.", + TestStep("15d", " TH sends SetCredential Command with CredentialIndex as 'max-num-credential-user'.", "Verify that the DUT sends SetCredentialResponse command with Status RESOURCE_EXHAUSTION."), - TestStep("15e","TH sends ClearCredential Command to DUT to clear all the credentials of PIN type.", + TestStep("15e", "TH sends ClearCredential Command to DUT to clear all the credentials of PIN type.", "Verify that the DUT sends SUCCESS response."), - TestStep("16"," TH sends SetUser Command to DUT.", + TestStep("16", " TH sends SetUser Command to DUT.", "Verify that the DUT sends SUCCESS response"), - TestStep("17","TH sends SetCredential Command to DUT with CredentialType.RFID.", + TestStep("17", "TH sends SetCredential Command to DUT with CredentialType.RFID.", "Verify that the DUT sends SetCredentialResponse command with Status SUCCESS."), - TestStep("18","TH sends SetCredential Command to DUT with CredentialType.PIN.", + TestStep("18", "TH sends SetCredential Command to DUT with CredentialType.PIN.", "Verify that the DUT sends SetCredentialResponse command with Status SUCCESS."), - TestStep("19","TH sends GetUser Command to DUT.", + TestStep("19", "TH sends GetUser Command to DUT.", "Verify that the DUT responds with GetUserResponse Command."), - TestStep("20","TH sends SetCredential Command to DUT to modify the CredentialData.", - "Verify that the DUT sends SetCredentialResponse command with Status SUCCESS."), - TestStep("21","TH sends GetUser Command to DUT.", + TestStep("20", "TH sends SetCredential Command to DUT to modify the CredentialData.", + "Verify that the DUT sends SetCredentialResponse command with Status SUCCESS."), + TestStep("21", "TH sends GetUser Command to DUT.", "Verify that the DUT responds with GetUserResponse Command."), - TestStep("22","TH sends ClearCredential Command to DUT to clear all the credentials.", + TestStep("22", "TH sends ClearCredential Command to DUT to clear all the credentials.", + "Verify that the DUT sends SUCCESS response."), + TestStep("23", "TH sends ClearUser Command to DUT.", "Verify that the DUT sends SUCCESS response."), - TestStep("23","TH sends ClearUser Command to DUT.", - "Verify that the DUT sends SUCCESS response."), ] return steps @@ -131,22 +132,22 @@ async def read_attributes_from_dut(self, endpoint, cluster, attribute, expected_ logging.error(e) asserts.assert_equal(expected_status, Status.Success, f"Error reading attributes, response={attribute_value}") - + def pics_TC_DRLK_2_9(self) -> list[str]: return ["DRLK.S"] - + async def generate_code(self): - - validpincodestr = await self.generate_pincode(self.maxpincodelength) + + validpincodestr = await self.generate_pincode(self.maxpincodelength) self.pin_code = bytes(validpincodestr, 'ascii') - validpincodestr = await self.generate_pincode(self.maxpincodelength) - self.pin_code1 = bytes(validpincodestr, 'ascii') - validpincodestr = await self.generate_pincode(self.maxpincodelength) - self.pin_code2 = bytes(validpincodestr, 'ascii') + validpincodestr = await self.generate_pincode(self.maxpincodelength) + self.pin_code1 = bytes(validpincodestr, 'ascii') + validpincodestr = await self.generate_pincode(self.maxpincodelength) + self.pin_code2 = bytes(validpincodestr, 'ascii') inavlidpincodestr = await self.generate_pincode(self.maxpincodelength+1) - self.inavlid_pincode = bytes(inavlidpincodestr, 'ascii') - validpincodestr = await self.generate_pincode(self.maxrfidcodelength) - self.rfid_tag = bytes(validpincodestr, 'ascii') + self.inavlid_pincode = bytes(inavlidpincodestr, 'ascii') + validpincodestr = await self.generate_pincode(self.maxrfidcodelength) + self.rfid_tag = bytes(validpincodestr, 'ascii') async def send_clear_user_cmd(self, user_index, expected_status: Status = Status.Success): try: @@ -157,27 +158,27 @@ async def send_clear_user_cmd(self, user_index, expected_status: Status = Status except InteractionModelError as e: asserts.assert_equal(e.status, expected_status, f"Unexpected error returned: {e}") - async def get_user(self,userindex,username,useruniqueid,credentiallist,expected_status: Status = Status.Success): + async def get_user(self, userindex, username, useruniqueid, credentiallist, expected_status: Status = Status.Success): try: - response = await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.GetUser(userIndex = userindex), - endpoint=self.app_cluster_endpoint, - timedRequestTimeoutMs=1000) + response = await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.GetUser(userIndex=userindex), + endpoint=self.app_cluster_endpoint, + timedRequestTimeoutMs=1000) asserts.assert_true(type_matches(response, Clusters.DoorLock.Commands.GetUserResponse), - "Unexpected return type for GetUserResponse") + "Unexpected return type for GetUserResponse") asserts.assert_true(response.userIndex == userindex, - "Error when executing GetUserResponse command, credentialExists={}".format( - str(response.userIndex))) + "Error when executing GetUserResponse command, credentialExists={}".format( + str(response.userIndex))) asserts.assert_true(response.userName == username, - "Error when executing GetUserResponse command, credentialExists={}".format( - str(response.userName))) + "Error when executing GetUserResponse command, credentialExists={}".format( + str(response.userName))) asserts.assert_true(response.userUniqueID == useruniqueid, - "Error when executing GetUserResponse command, credentialExists={}".format( - str(response.userUniqueID))) + "Error when executing GetUserResponse command, credentialExists={}".format( + str(response.userUniqueID))) asserts.assert_true(response.credentials == credentiallist, - "Error when executing GetUserResponse command, credentialExists={}".format( - str(response.credentials))) + "Error when executing GetUserResponse command, credentialExists={}".format( + str(response.credentials))) asserts.assert_equal(expected_status, Status.Success) - + except InteractionModelError as e: asserts.assert_equal(e.status, expected_status, f"Unexpected error returned: {e}") @@ -187,63 +188,63 @@ async def get_credentials_status(self, credentialIndex: int, credentialType: clu self.step(step) try: credentials_struct = cluster.Structs.CredentialStruct(credentialIndex=credentialIndex, - credentialType=credentialType) + credentialType=credentialType) response = await self.send_single_cmd(endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000, - cmd=cluster.Commands.GetCredentialStatus( - credential=credentials_struct)) + cmd=cluster.Commands.GetCredentialStatus( + credential=credentials_struct)) asserts.assert_true(type_matches(response, Clusters.DoorLock.Commands.GetCredentialStatusResponse), - "Unexpected return type for GetCredentialStatus") + "Unexpected return type for GetCredentialStatus") asserts.assert_true(response.credentialExists == credential_exists, - "Error when executing GetCredentialStatus command, credentialExists={}".format( - str(response.credentialExists))) + "Error when executing GetCredentialStatus command, credentialExists={}".format( + str(response.credentialExists))) if (credential_exists == False): - asserts.assert_true(response.userIndex == NullValue, + asserts.assert_true(response.userIndex == NullValue, "Error when executing GetCredentialStatus command, credentialExists={}".format( - str(response.userIndex))) + str(response.userIndex))) return response except InteractionModelError as e: logging.error(e) asserts.assert_equal(e.status, Status.Success, f"Unexpected error returned: {e}") - async def set_credential_cmd(self, credential_enum: Clusters.Objects.DoorLock.Enums.CredentialTypeEnum, statuscode,credentialIndex, + async def set_credential_cmd(self, credential_enum: Clusters.Objects.DoorLock.Enums.CredentialTypeEnum, statuscode, credentialIndex, operationType, userIndex, credentialData, userStatus, userType): - custom_stautus_code = 149 + custom_stautus_code = 149 credentials = cluster.Structs.CredentialStruct( credentialType=credential_enum, - credentialIndex=credentialIndex) + credentialIndex=credentialIndex) try: - logging.info("maxpincodelength value is %s" % (self.maxpincodelength)) - logging.info("maxrfidcodelength value is %s" % (self.maxrfidcodelength)) - logging.info("Credential Data is %s" % (credentialData)) - response = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetCredential( - operationType=operationType, - credential=credentials, - credentialData=credentialData, - userStatus=userStatus, - userType=userType, - userIndex=userIndex), - endpoint=self.app_cluster_endpoint, - timedRequestTimeoutMs=1000) - asserts.assert_true(type_matches(response, Clusters.Objects.DoorLock.Commands.SetCredentialResponse), - "Unexpected return type for SetCredential") - - if (statuscode != custom_stautus_code): - asserts.assert_true(response.status == statuscode, + logging.info("maxpincodelength value is %s" % (self.maxpincodelength)) + logging.info("maxrfidcodelength value is %s" % (self.maxrfidcodelength)) + logging.info("Credential Data is %s" % (credentialData)) + response = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetCredential( + operationType=operationType, + credential=credentials, + credentialData=credentialData, + userStatus=userStatus, + userType=userType, + userIndex=userIndex), + endpoint=self.app_cluster_endpoint, + timedRequestTimeoutMs=1000) + asserts.assert_true(type_matches(response, Clusters.Objects.DoorLock.Commands.SetCredentialResponse), + "Unexpected return type for SetCredential") + + if (statuscode != custom_stautus_code): + asserts.assert_true(response.status == statuscode, + "Error sending SetCredential command, status={}".format(str(response.status))) + else: + asserts.assert_true(response.status == 2 or response.status == 3, "Error sending SetCredential command, status={}".format(str(response.status))) - else: - asserts.assert_true (response.status == 2 or response.status == 3, - "Error sending SetCredential command, status={}".format(str(response.status))) except InteractionModelError as e: - logging.exception(e) - asserts.assert_equal(e.status, statuscode, f"Unexpected error returned: {e}") + logging.exception(e) + asserts.assert_equal(e.status, statuscode, f"Unexpected error returned: {e}") async def clear_credentials_cmd(self, credential, step=None, expected_status: Status = Status.Success): try: await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.ClearCredential(credential=credential), - endpoint=self.app_cluster_endpoint, - timedRequestTimeoutMs=1000) + endpoint=self.app_cluster_endpoint, + timedRequestTimeoutMs=1000) except InteractionModelError as e: logging.exception(e) asserts.assert_equal(e.status, expected_status, f"Unexpected error returned: {e}") @@ -255,44 +256,42 @@ async def test_TC_DRLK_2_9(self): self.numberofcredentialsupportedperuser = None self.common_cluster_endpoint = 0 self.app_cluster_endpoint = 1 - self.invalid_credential_type = 9 + self.invalid_credential_type = 9 self.user_unique_id1 = 6459 self.user_unique_id2 = 1111 self.user_name = "xxx" self.credentialIndex_1 = 1 self.credentialIndex_2 = 2 self.credentialIndex_3 = 3 - self.operationType=cluster.Enums.DataOperationTypeEnum.kAdd - self.userIndex_1=1 - self.userIndex_2=2 + self.operationType = cluster.Enums.DataOperationTypeEnum.kAdd + self.userIndex_1 = 1 + self.userIndex_2 = 2 self.invalid_user_status = 5 - self.invalid_user_type = 10 + self.invalid_user_type = 10 self.pics_send_setcredential_pin_cmd = False self.pics_send_setcredential_rfid_cmd = False - self.pin_code = b"" + self.pin_code = b"" self.pin_code1 = b"" - self.pin_code2 = b"" + self.pin_code2 = b"" self.inavlid_pincode = b"" self.rfid_tag = b"" - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") - and self.check_pics("DRLK.S.C22.Rsp") and self.check_pics("DRLK.S.C23.Tx")): + and self.check_pics("DRLK.S.C22.Rsp") and self.check_pics("DRLK.S.C23.Tx")): self.pics_send_setcredential_pin_cmd = True - if self.pics_guard(self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C22.Rsp") - and self.check_pics("DRLK.S.C23.Tx")): - self.pics_send_setcredential_rfid_cmd = True - + if self.pics_guard(self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C22.Rsp") + and self.check_pics("DRLK.S.C23.Tx")): + self.pics_send_setcredential_rfid_cmd = True self.step("1") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.A0011")): + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.A0011")): self.numberoftotaluserssupported = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.NumberOfTotalUsersSupported) - self.step("2a") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): - try: + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.NumberOfTotalUsersSupported) + self.step("2a") + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): + try: await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetUser( operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, userIndex=1, @@ -303,91 +302,91 @@ async def test_TC_DRLK_2_9(self): credentialRule=Clusters.DoorLock.Enums.CredentialRuleEnum.kSingle), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - except InteractionModelError as e: + except InteractionModelError as e: logging.exception(e) - self.step("2b") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.F00")): + self.step("2b") + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.F00")): self.minpincodelength = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.MinPINCodeLength) + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.MinPINCodeLength) self.step("2c") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.F00")): + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.F00")): self.maxpincodelength = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.MaxPINCodeLength) + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.MaxPINCodeLength) self.step("2d") - if self.pics_guard(self.check_pics("DRLK.S.F01")): + if self.pics_guard(self.check_pics("DRLK.S.F01")): self.minrfidcodelength = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.MinRFIDCodeLength) + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.MinRFIDCodeLength) self.step("2e") - if self.pics_guard(self.check_pics("DRLK.S.F01")): + if self.pics_guard(self.check_pics("DRLK.S.F01")): self.maxrfidcodelength = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.MaxRFIDCodeLength) + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.MaxRFIDCodeLength) self.step("2f") await self.generate_code() if self.pics_send_setcredential_pin_cmd: - - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) + + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) self.step("3") if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") - and self.check_pics("DRLK.S.C24.Rsp") and self.check_pics("DRLK.S.C25.Tx")): - await self.get_credentials_status(credentialIndex=self.credentialIndex_1, - credentialType=cluster.Enums.CredentialTypeEnum.kPin,step=None, userIndex= 1,credential_exists = True) + and self.check_pics("DRLK.S.C24.Rsp") and self.check_pics("DRLK.S.C25.Tx")): + await self.get_credentials_status(credentialIndex=self.credentialIndex_1, + credentialType=cluster.Enums.CredentialTypeEnum.kPin, step=None, userIndex=1, credential_exists=True) self.step("4") if self.pics_send_setcredential_pin_cmd: - - await self.set_credential_cmd(credentialData= self.inavlid_pincode, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_2, userIndex=self.userIndex_1, userStatus=self.invalid_user_status, userType=self.invalid_user_type, statuscode = Status.InvalidCommand) + + await self.set_credential_cmd(credentialData=self.inavlid_pincode, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_2, userIndex=self.userIndex_1, userStatus=self.invalid_user_status, userType=self.invalid_user_type, statuscode=Status.InvalidCommand) self.step("5") if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_2, userIndex=NullValue, userStatus=NullValue, userType=NullValue,statuscode = 2) - + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_2, userIndex=NullValue, userStatus=NullValue, userType=NullValue, statuscode=2) + self.step("6a") if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1, userIndex=NullValue, userStatus=NullValue, userType=NullValue,statuscode = 149) + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=NullValue, userStatus=NullValue, userType=NullValue, statuscode=149) self.step("6b") if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code1, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1, userIndex=NullValue, userStatus=NullValue, userType=NullValue,statuscode = 149) + await self.set_credential_cmd(credentialData=self.pin_code1, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=NullValue, userStatus=NullValue, userType=NullValue, statuscode=149) self.step("7") if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code2, - operationType=cluster.Enums.DataOperationTypeEnum.kModify, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_3, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue,statuscode = Status.InvalidCommand) + await self.set_credential_cmd(credentialData=self.pin_code2, + operationType=cluster.Enums.DataOperationTypeEnum.kModify, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_3, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.InvalidCommand) self.step("8") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - credentials = cluster.Structs.CredentialStruct(credentialIndex=1, - credentialType=cluster.Enums.CredentialTypeEnum.kPin) - await self.clear_credentials_cmd(step=None, credential=credentials) + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): + credentials = cluster.Structs.CredentialStruct(credentialIndex=1, + credentialType=cluster.Enums.CredentialTypeEnum.kPin) + await self.clear_credentials_cmd(step=None, credential=credentials) self.step("9a") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C24.Rsp")): - await self.get_credentials_status(credentialIndex=self.credentialIndex_1, - credentialType=cluster.Enums.CredentialTypeEnum.kPin,step=None, userIndex= 1,credential_exists = False) + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C24.Rsp")): + await self.get_credentials_status(credentialIndex=self.credentialIndex_1, + credentialType=cluster.Enums.CredentialTypeEnum.kPin, step=None, userIndex=1, credential_exists=False) self.step("9b") if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1d.Rsp")): - await self.send_clear_user_cmd(user_index=1) + await self.send_clear_user_cmd(user_index=1) self.step("10") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): - try: + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): + try: await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetUser( operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, userIndex=self.userIndex_2, @@ -398,175 +397,176 @@ async def test_TC_DRLK_2_9(self): credentialRule=Clusters.DoorLock.Enums.CredentialRuleEnum.kSingle), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - except InteractionModelError as e: + except InteractionModelError as e: logging.exception(e) self.step("11") if self.pics_send_setcredential_pin_cmd: - validPincodeString = await self.generate_pincode(self.maxpincodelength) - validPincode = bytes(validPincodeString, 'ascii') - - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_2, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) + validPincodeString = await self.generate_pincode(self.maxpincodelength) + validPincode = bytes(validPincodeString, 'ascii') + + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_2, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) self.step("12a") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - credentials = cluster.Structs.CredentialStruct(credentialIndex=0xFFFE, - credentialType=cluster.Enums.CredentialTypeEnum.kPin) - await self.clear_credentials_cmd(step=None, credential=credentials) + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): + credentials = cluster.Structs.CredentialStruct(credentialIndex=0xFFFE, + credentialType=cluster.Enums.CredentialTypeEnum.kPin) + await self.clear_credentials_cmd(step=None, credential=credentials) self.step("13") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C24.Rsp")and self.check_pics("DRLK.S.C25.Tx")): - await self.get_credentials_status(credentialIndex=self.credentialIndex_1, - credentialType=cluster.Enums.CredentialTypeEnum.kPin,step=None, userIndex= 1,credential_exists = False) + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C24.Rsp") and self.check_pics("DRLK.S.C25.Tx")): + await self.get_credentials_status(credentialIndex=self.credentialIndex_1, + credentialType=cluster.Enums.CredentialTypeEnum.kPin, step=None, userIndex=1, credential_exists=False) self.step("14a") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - feature_map = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.FeatureMap) + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): + feature_map = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.FeatureMap) isALIROSupported = feature_map & Clusters.DoorLock.Bitmaps.Feature.kAliroProvisioning - if(isALIROSupported): - credentials = cluster.Structs.CredentialStruct(credentialIndex=1, - credentialType=cluster.Enums.CredentialTypeEnum.kAliroNonEvictableEndpointKey) - await self.clear_credentials_cmd(step=None, credential=credentials) + if (isALIROSupported): + credentials = cluster.Structs.CredentialStruct(credentialIndex=1, + credentialType=cluster.Enums.CredentialTypeEnum.kAliroNonEvictableEndpointKey) + await self.clear_credentials_cmd(step=None, credential=credentials) else: - try: - await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.ClearCredential(credential=credentials), + try: + await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.ClearCredential(credential=credentials), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - asserts.fail("Unexpected success in sending ClearCredential Command with invalid CredentialTpe") - - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.InvalidCommand, - "Unexpected error sending ClearCredential Command with invalid CredentialTpe") - + asserts.fail("Unexpected success in sending ClearCredential Command with invalid CredentialTpe") + + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidCommand, + "Unexpected error sending ClearCredential Command with invalid CredentialTpe") + self.step("14b") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - credentials = cluster.Structs.CredentialStruct(credentialIndex=1, - credentialType=self.invalid_credential_type) - try: - await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.ClearCredential(credential=credentials), + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): + credentials = cluster.Structs.CredentialStruct(credentialIndex=1, + credentialType=self.invalid_credential_type) + try: + await self.send_single_cmd(cmd=Clusters.DoorLock.Commands.ClearCredential(credential=credentials), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - asserts.fail("Unexpected success in sending ClearCredential Command with invalid CredentialTpe") - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.InvalidCommand, - "Unexpected error sending ClearCredential Command with invalid CredentialTpe") - + asserts.fail("Unexpected success in sending ClearCredential Command with invalid CredentialTpe") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidCommand, + "Unexpected error sending ClearCredential Command with invalid CredentialTpe") + self.step("14c") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1d.Rsp")): - await self.send_clear_user_cmd(self.userIndex_1) - + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1d.Rsp")): + await self.send_clear_user_cmd(self.userIndex_1) + self.step("15a") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.A001c")): - - numberofcredentialsupportedperuser = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, - cluster=Clusters.Objects.DoorLock, - attribute=Clusters.DoorLock.Attributes.NumberOfCredentialsSupportedPerUser) + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.A001c")): + + numberofcredentialsupportedperuser = await self.read_attributes_from_dut(endpoint=self.app_cluster_endpoint, + cluster=Clusters.Objects.DoorLock, + attribute=Clusters.DoorLock.Attributes.NumberOfCredentialsSupportedPerUser) self.step("15b") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): - try: + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): + try: await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetUser( operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, userIndex=self.userIndex_1, userName=self.user_name, - userUniqueID=self.user_unique_id1 , + userUniqueID=self.user_unique_id1, userStatus=Clusters.DoorLock.Enums.UserStatusEnum.kOccupiedEnabled, userType=Clusters.DoorLock.Enums.UserTypeEnum.kUnrestrictedUser, credentialRule=Clusters.DoorLock.Enums.CredentialRuleEnum.kSingle), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - except InteractionModelError as e: + except InteractionModelError as e: logging.exception(e) self.step("15c") if self.pics_send_setcredential_pin_cmd: - logging.info("setting 'start_credential_index' to value 1 ") - start_credential_index = 1 - while 1: - uniquePincodeString = await self.generate_pincode(self.maxpincodelength) - uniquePincode = bytes(uniquePincodeString, 'ascii') - logging.info("Credential Data value is %s" % (uniquePincode)) - if start_credential_index <= (numberofcredentialsupportedperuser): - await self.set_credential_cmd(credentialData=uniquePincode, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=start_credential_index, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) - start_credential_index += 1 - logging.info(f"The updated value of start_credential_index is {start_credential_index}") - else: - break + logging.info("setting 'start_credential_index' to value 1 ") + start_credential_index = 1 + while 1: + uniquePincodeString = await self.generate_pincode(self.maxpincodelength) + uniquePincode = bytes(uniquePincodeString, 'ascii') + logging.info("Credential Data value is %s" % (uniquePincode)) + if start_credential_index <= (numberofcredentialsupportedperuser): + await self.set_credential_cmd(credentialData=uniquePincode, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=start_credential_index, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) + start_credential_index += 1 + logging.info(f"The updated value of start_credential_index is {start_credential_index}") + else: + break self.step("15d") - if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=start_credential_index, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.ResourceExhausted) + if self.pics_send_setcredential_pin_cmd: + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=start_credential_index, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.ResourceExhausted) self.step("15e") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - credentials = cluster.Structs.CredentialStruct(credentialIndex= 0xFFFE, - credentialType=cluster.Enums.CredentialTypeEnum.kPin) - await self.clear_credentials_cmd(step=None, credential=credentials) + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): + credentials = cluster.Structs.CredentialStruct(credentialIndex=0xFFFE, + credentialType=cluster.Enums.CredentialTypeEnum.kPin) + await self.clear_credentials_cmd(step=None, credential=credentials) self.step("16") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): - try: + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1a.Rsp")): + try: await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetUser( operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, userIndex=self.userIndex_1, userName=self.user_name, - userUniqueID=self.user_unique_id1 , + userUniqueID=self.user_unique_id1, userStatus=Clusters.DoorLock.Enums.UserStatusEnum.kOccupiedEnabled, userType=Clusters.DoorLock.Enums.UserTypeEnum.kUnrestrictedUser, credentialRule=Clusters.DoorLock.Enums.CredentialRuleEnum.kSingle), endpoint=self.app_cluster_endpoint, timedRequestTimeoutMs=1000) - except InteractionModelError as e: + except InteractionModelError as e: logging.exception(e) self.step("17") if self.pics_send_setcredential_rfid_cmd: - - await self.set_credential_cmd(credentialData=self.rfid_tag, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kRfid, - credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) + + await self.set_credential_cmd(credentialData=self.rfid_tag, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kRfid, + credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) self.step("18") - if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code, - operationType=cluster.Enums.DataOperationTypeEnum.kAdd, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) + if self.pics_send_setcredential_pin_cmd: + await self.set_credential_cmd(credentialData=self.pin_code, + operationType=cluster.Enums.DataOperationTypeEnum.kAdd, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) self.step("19") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C1b.Rsp")): + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C1b.Rsp")): - credentiallist: list[cluster.Structs.CredentialStruct] - credentiallist = [cluster.Structs.CredentialStruct(credentialIndex= 1, - credentialType=cluster.Enums.CredentialTypeEnum.kRfid), - cluster.Structs.CredentialStruct(credentialIndex= 1, - credentialType=cluster.Enums.CredentialTypeEnum.kPin)] - await self.get_user(self.userIndex_1,self.user_name,self.user_unique_id1 ,credentiallist,Status.Success) + credentiallist: list[cluster.Structs.CredentialStruct] + credentiallist = [cluster.Structs.CredentialStruct(credentialIndex=1, + credentialType=cluster.Enums.CredentialTypeEnum.kRfid), + cluster.Structs.CredentialStruct(credentialIndex=1, + credentialType=cluster.Enums.CredentialTypeEnum.kPin)] + await self.get_user(self.userIndex_1, self.user_name, self.user_unique_id1, credentiallist, Status.Success) self.step("20") if self.pics_send_setcredential_pin_cmd: - await self.set_credential_cmd(credentialData=self.pin_code1, - operationType=cluster.Enums.DataOperationTypeEnum.kModify, - credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, - credentialIndex=self.credentialIndex_1,userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode = Status.Success) - - self.step("21") - if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C1b.Rsp")): - await self.get_user(self.userIndex_1,self.user_name,self.user_unique_id1 ,credentiallist,Status.Success) + await self.set_credential_cmd(credentialData=self.pin_code1, + operationType=cluster.Enums.DataOperationTypeEnum.kModify, + credential_enum=Clusters.Objects.DoorLock.Enums.CredentialTypeEnum.kPin, + credentialIndex=self.credentialIndex_1, userIndex=self.userIndex_1, userStatus=NullValue, userType=NullValue, statuscode=Status.Success) + + self.step("21") + if self.pics_guard(self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F01") and self.check_pics("DRLK.S.C1b.Rsp")): + await self.get_user(self.userIndex_1, self.user_name, self.user_unique_id1, credentiallist, Status.Success) self.step("22") if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C26.Rsp")): - await self.clear_credentials_cmd(step=None, credential=NullValue) + await self.clear_credentials_cmd(step=None, credential=NullValue) self.step("23") - if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1d.Rsp")): - await self.send_clear_user_cmd(self.userIndex_1) - + if self.pics_guard(self.check_pics("DRLK.S.F08") and self.check_pics("DRLK.S.C1d.Rsp")): + await self.send_clear_user_cmd(self.userIndex_1) + + if __name__ == '__main__': default_matter_test_main()