Skip to content

Commit f4e8976

Browse files
committed
Implemented functionality to validate DEMM in tests
1 parent ae0c486 commit f4e8976

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

src/python_testing/TC_DEMM_1_2.py

+18-17
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main
4343
from modebase_cluster_check import ModeBaseClusterChecks
4444

45-
CLUSTER = Clusters.RefrigeratorAndTemperatureControlledCabinetMode
45+
CLUSTER = Clusters.DeviceEnergyManagementMode
4646

4747

4848
class TC_DEMM_1_2(MatterBaseTest, ModeBaseClusterChecks):
@@ -60,8 +60,8 @@ def steps_TC_DEMM_1_2(self) -> list[TestStep]:
6060
TestStep(1, "Commissioning, already done", is_commissioning=True),
6161
TestStep(2, "TH reads from the DUT the SupportedModes attribute."),
6262
TestStep(3, "TH reads from the DUT the CurrentMode attribute."),
63-
TestStep(4, "TH reads from the DUT the OnMode attribute."),
64-
TestStep(5, "TH reads from the DUT the StartUpMode attribute.")
63+
# TestStep(4, "TH reads from the DUT the OnMode attribute."),
64+
# TestStep(5, "TH reads from the DUT the StartUpMode attribute.")
6565
]
6666
return steps
6767

@@ -82,28 +82,29 @@ async def test_TC_DEMM_1_2(self):
8282
self.step(2)
8383
# Verify common checks for Mode Base as described in the TC-DEMM-1.2
8484
supported_modes = await self.check_supported_modes_and_labels(endpoint=endpoint)
85-
# According to the spec, there should be at least one RapidCool or RapidFreeze tag in
85+
# According to the spec, there should be at least on like
86+
# No Optimization, Device Optimization, Local Optimization, or Grid Optimization tag in
8687
# the ones supported.
87-
additional_tags = [CLUSTER.Enums.ModeTag.kRapidCool,
88-
CLUSTER.Enums.ModeTag.kRapidFreeze]
88+
additional_tags = [CLUSTER.Enums.ModeTag.kNoOptimization,
89+
CLUSTER.Enums.ModeTag.kDeviceOptimization]
8990
self.check_tags_in_lists(supported_modes=supported_modes, required_tags=additional_tags)
9091

9192
self.step(3)
9293
# Verify that the CurrentMode attribute has a valid value.
9394
mode = self.cluster.Attributes.CurrentMode
9495
await self.read_and_check_mode(endpoint=endpoint, mode=mode, supported_modes=supported_modes)
9596

96-
self.step(4)
97-
# Verify that the OnMode attribute has a valid value or null.
98-
mode = self.cluster.Attributes.OnMode
99-
await self.read_and_check_mode(endpoint=endpoint, mode=mode,
100-
supported_modes=supported_modes, is_nullable=True)
101-
102-
self.step(5)
103-
# Verify that the StartUpMode has a valid value or null
104-
mode = self.cluster.Attributes.StartUpMode
105-
await self.read_and_check_mode(endpoint=endpoint, mode=mode,
106-
supported_modes=supported_modes, is_nullable=True)
97+
# self.step(4)
98+
# # Verify that the OnMode attribute has a valid value or null.
99+
# mode = self.cluster.Attributes.OnMode
100+
# await self.read_and_check_mode(endpoint=endpoint, mode=mode,
101+
# supported_modes=supported_modes, is_nullable=True)
102+
103+
# self.step(5)
104+
# # Verify that the StartUpMode has a valid value or null
105+
# mode = self.cluster.Attributes.StartUpMode
106+
# await self.read_and_check_mode(endpoint=endpoint, mode=mode,
107+
# supported_modes=supported_modes, is_nullable=True)
107108

108109

109110
if __name__ == "__main__":

0 commit comments

Comments
 (0)