[TC-TSTAT-2.2] Adding test steps 13b and 15b (#38555)
* Delete Test_TC_TSTAT_2_2.yaml
* Update TC_TSTAT_2_2.py by adding Step-13b and 15b
* Restyled by autopep8
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/python_testing/TC_TSTAT_2_2.py b/src/python_testing/TC_TSTAT_2_2.py
index f4e1dfb..91caed8 100644
--- a/src/python_testing/TC_TSTAT_2_2.py
+++ b/src/python_testing/TC_TSTAT_2_2.py
@@ -89,9 +89,11 @@
TestStep("11b", "Test Harness Writes the value below MinSetpointDeadBand"),
TestStep("11c", "Test Harness Writes the min limit of MinSetpointDeadBand"),
TestStep("12", "Test Harness Reads ControlSequenceOfOperation from Server DUT, if TSTAT.S.F01 is true"),
- TestStep("13", "Sets OccupiedCoolingSetpoint to default value"),
+ TestStep("13a", "Sets OccupiedCoolingSetpoint to default value"),
+ TestStep("13b", "Sets SetpointRaiseLower set to Heat (0x00), and the amount set to 0xE2 (-30 units = -3 degrees)."),
TestStep("14", "Sets OccupiedHeatingSetpoint to default value"),
- TestStep("15", "Test Harness Sends SetpointRaise Command Cool Only"),
+ TestStep("15a", "Test Harness Sends SetpointRaise Command Cool Only"),
+ TestStep("15b", "Sets SetpointRaiseLower set to Cool (0x01), and the amount set to 0xE2 (-30 units = -3 degrees)."),
TestStep("16", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("17", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("18", "Sets OccupiedCoolingSetpoint to default value"),
@@ -674,7 +676,7 @@
if val != ControlSequenceOfOperation:
asserts.assert_equal(val, 4)
- self.step("13")
+ self.step("13a")
if self.pics_guard(hasCoolingFeature):
# Sets OccupiedCoolingSetpoint to default value
@@ -691,6 +693,13 @@
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
asserts.assert_equal(val, OccupiedHeatingSetpointValue - 30 * 10)
+ self.step("13b")
+
+ if self.pics_guard(not hasHeatingFeature):
+ # Sends SetpointRaise Command Heat Only
+ await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kHeat, amount=-30), endpoint=endpoint)
+ asserts.assert_equal(status, Status.InvalidCommand)
+
self.step("14")
if self.pics_guard(hasHeatingFeature):
@@ -704,7 +713,7 @@
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
asserts.assert_equal(val, OccupiedHeatingSetpointValue + 30 * 10)
- self.step("15")
+ self.step("15a")
if self.pics_guard(hasCoolingFeature):
# Test Harness Sends SetpointRaise Command Cool Only
@@ -714,6 +723,13 @@
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedCoolingSetpoint)
asserts.assert_equal(val, OccupiedCoolingSetpointValue - 30 * 10)
+ self.step("15b")
+
+ if self.pics_guard(not hasCoolingFeature):
+ # Test Harness Sends SetpointRaise Command Cool Only
+ await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kCool, amount=-30), endpoint=endpoint)
+ asserts.assert_equal(status, Status.InvalidCommand)
+
self.step("16")
if self.pics_guard(hasCoolingFeature):