Skip to content

Commit 801e054

Browse files
committed
couple little fixes
1 parent 00deb59 commit 801e054

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/python_testing/TC_VALCC_3_2.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ def steps_TC_VALCC_3_2(self) -> list[TestStep]:
5656
TestStep(1, "Commissioning, already done", is_commissioning=True),
5757
TestStep(2, "Set up a subscription to all attributes on the DUT"),
5858
TestStep(3, "Send a close command to the DUT and wait until the CurrentState is closed", "DUT returns SUCCESS"),
59-
6059
TestStep(4, "TH sends command Open command with TargetLevel field set to 100 and the remaining fields not populated.",
6160
"Verify DUT responds w/ status SUCCESS(0x00)."),
6261
TestStep(5, "Wait until TH receives data reports for TargetState set to NULL, TargetLevel set to NULL, CurrentState set to Open and CurrentLevel set to 100 (ordering does not matter)",
6362
"Expected attribute reports are received"),
64-
6563
TestStep(6, "Read CurrentState, CurrentLevel, TargetState and TargetLevel attributes",
66-
"CurrentState is Open, CurrentLevel is 100, TargetState is NULL and TagetLevel is NULL"),
64+
"CurrentState is Open, CurrentLevel is 100, TargetState is NULL and TargetLevel is NULL"),
6765
TestStep(7, "Send Close command", "DUT returns SUCCESS"),
6866
TestStep(8, "Wait until TH receives and data report for TargetState set to NULL and an attribute report for CurrentState set to Closed (ordering does not matter)",
6967
"Expected attribute reports are received"),
@@ -81,6 +79,8 @@ def pics_TC_VALCC_3_2(self) -> list[str]:
8179
async def test_TC_VALCC_3_2(self):
8280

8381
endpoint = self.get_endpoint(default=1)
82+
asserts.assert_is_not_none(
83+
endpoint, "Endpoint is required for this tests. The test endpoint is set using the --endpoint flag")
8484

8585
self.step(1)
8686
attributes = Clusters.ValveConfigurationAndControl.Attributes
@@ -120,8 +120,8 @@ async def test_TC_VALCC_3_2(self):
120120
expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue),
121121
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState,
122122
value=cluster.Enums.ValveStateEnum.kOpen),
123-
AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, values=NullValue),
124-
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, values=100)]
123+
AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue),
124+
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=100)]
125125
attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout)
126126

127127
self.step(6)
@@ -142,8 +142,8 @@ async def test_TC_VALCC_3_2(self):
142142
expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue),
143143
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState,
144144
value=cluster.Enums.ValveStateEnum.kClosed),
145-
AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, values=NullValue),
146-
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, values=0)]
145+
AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue),
146+
AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=0)]
147147
attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout)
148148
attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout)
149149

@@ -154,7 +154,7 @@ async def test_TC_VALCC_3_2(self):
154154
current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel)
155155
asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kClosed, "CurrentState is not closed")
156156
asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null")
157-
asserts.assert_equal(current_level_dut, 100, "CurrentLevel is not 0")
157+
asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not 0")
158158
asserts.assert_equal(target_level_dut, NullValue, "TargetLevel is not null")
159159

160160

0 commit comments

Comments
 (0)