Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HVAC] Use Globals.Enums.AtomicRequestTypeEnum in TC_TSTAT_4_2 #34824

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/python_testing/TC_TSTAT_4_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import logging

import chip.clusters as Clusters
from chip.clusters import Globals
from chip.clusters.Types import NullValue
from chip.interaction_model import InteractionModelError, Status
from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main
Expand Down Expand Up @@ -65,7 +66,7 @@ async def send_edit_atomic_request_begin_command(self,
endpoint: int = None,
expected_status: Status = Status.Success):
try:
await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=0,
await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=Globals.Enums.AtomicRequestTypeEnum.kBeginWrite,
attributeRequests=[
cluster.Attributes.Presets.attribute_id],
timeout=1800),
Expand All @@ -81,7 +82,7 @@ async def send_edit_atomic_request_commit_command(self,
expected_overall_status: Status = Status.Success,
expected_preset_status: Status = Status.Success):
try:
response = await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=1,
response = await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=Globals.Enums.AtomicRequestTypeEnum.kCommitWrite,
attributeRequests=[cluster.Attributes.Presets.attribute_id, cluster.Attributes.Schedules.attribute_id]),
endpoint=endpoint)
asserts.assert_equal(expected_status, Status.Success, "We expected we had a valid commit command")
Expand All @@ -100,7 +101,7 @@ async def send_edit_atomic_request_rollback_command(self,
endpoint: int = None,
expected_status: Status = Status.Success):
try:
await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=2,
await self.send_single_cmd(cmd=cluster.Commands.AtomicRequest(requestType=Globals.Enums.AtomicRequestTypeEnum.kRollbackWrite,
attributeRequests=[cluster.Attributes.Presets.attribute_id, cluster.Attributes.Schedules.attribute_id]),
endpoint=endpoint)
asserts.assert_equal(expected_status, Status.Success)
Expand Down
Loading