Skip to content

Commit 129ba81

Browse files
authored
Fixed check in step 5 of TC-SEAR-1.2 (project-chip#35221)
* Fixed check in step 5 of TC-SEAR-1.2 * Fixed check for EstimatedEndTime being not null in step 6.
1 parent 6a53ed4 commit 129ba81

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/python_testing/TC_SEAR_1_2.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ async def read_and_validate_current_area(self, step):
140140
endpoint=self.endpoint, attribute=Clusters.ServiceArea.Attributes.CurrentArea)
141141
logging.info(f"CurrentArea {current_area}")
142142

143-
asserts.assert_true((len(self.selareaid_list) == 0 and current_area is NullValue)
144-
or
145-
current_area in self.selareaid_list,
146-
f"CurrentArea {current_area} is invalid. SelectedAreas is {self.selareaid_list}.")
143+
if current_area is not NullValue:
144+
asserts.assert_true(current_area in self.areaid_list,
145+
f"CurrentArea {current_area} is not in SupportedAreas: {self.areaid_list}.")
146+
147147
# save so other methods can use this if needed
148148
self.current_area = current_area
149149

@@ -158,7 +158,8 @@ async def read_and_validate_estimated_end_time(self, step):
158158
if self.current_area is NullValue:
159159
asserts.assert_true(estimated_end_time is NullValue,
160160
"EstimatedEndTime should be null if CurrentArea is null.")
161-
else:
161+
162+
if estimated_end_time is not NullValue:
162163
# allow for some clock skew
163164
asserts.assert_true(estimated_end_time >= read_time - 3*60,
164165
f"EstimatedEndTime({estimated_end_time}) should be greater than the time when it was read({read_time})")

0 commit comments

Comments
 (0)