Skip to content

Commit

Permalink
Updating TC_RVCCLEANM_2_1, RVCRUNM_2_1, and RVCRUNM_2_2 test modules:
Browse files Browse the repository at this point in the history
- Updating to using command_guard() and attribute_guard() where applicable
  • Loading branch information
j-ororke committed Dec 19, 2024
1 parent 53e2575 commit 26985ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/python_testing/TC_RVCCLEANM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ async def test_TC_RVCCLEANM_2_1(self):
commands = RVCClean_cluster.Commands
RVCClean_accptcmd_list = attributes.AcceptedCommandList
RVCClean_gencmd_list = attributes.GeneratedCommandList
accepted_cmd_list = await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=RVCClean_cluster, attribute=RVCClean_accptcmd_list)
generated_cmd_list = await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=RVCClean_cluster, attribute=RVCClean_gencmd_list)
chg_mode_cmd_id = commands.ChangeToMode.command_id
chg_rsp_cmd_id = commands.ChangeToModeResponse.command_id

if chg_mode_cmd_id not in accepted_cmd_list:
if not await self.command_guard(endpoint=self.endpoint, command=commands.ChangeToMode):
asserts.fail("Change To Mode receiving commands needs to be supported")

if chg_rsp_cmd_id not in generated_cmd_list:
Expand Down
5 changes: 1 addition & 4 deletions src/python_testing/TC_RVCRUNM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,11 @@ async def test_TC_RVCRUNM_2_1(self):

# Gathering Accepted and Generated Commands and associated ids
commands = RVCRun_cluster.Commands
RVCRun_accptcmd_list = attributes.AcceptedCommandList
RVCRun_gencmd_list = attributes.GeneratedCommandList
accepted_cmd_list = await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=RVCRun_cluster, attribute=RVCRun_accptcmd_list)
generated_cmd_list = await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=RVCRun_cluster, attribute=RVCRun_gencmd_list)
chg_mode_cmd_id = commands.ChangeToMode.command_id
chg_rsp_cmd_id = commands.ChangeToModeResponse.command_id

if chg_mode_cmd_id not in accepted_cmd_list:
if not await self.command_guard(endpoint=self.endpoint, command=commands.ChangeToMode):
asserts.fail("Change To Mode receiving commands needs to be supported")

if chg_rsp_cmd_id not in generated_cmd_list:
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_RVCRUNM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def test_TC_RVCRUNM_2_2(self):
accepted_cmd_list = await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=RVCRun_cluster, attribute=RVCRun_accptcmd_list)
chg_mode_cmd_id = commands.ChangeToMode.command_id

if chg_mode_cmd_id not in accepted_cmd_list:
if not await self.command_guard(endpoint=self.endpoint, command=commands.ChangeToMode):
asserts.fail("Change To Mode receiving commands needs to be supported")

asserts.assert_true(self.check_pics("RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED"),
Expand Down

0 comments on commit 26985ab

Please sign in to comment.