File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -140,10 +140,10 @@ async def read_and_validate_current_area(self, step):
140
140
endpoint = self .endpoint , attribute = Clusters .ServiceArea .Attributes .CurrentArea )
141
141
logging .info (f"CurrentArea { current_area } " )
142
142
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
+
147
147
# save so other methods can use this if needed
148
148
self .current_area = current_area
149
149
@@ -158,7 +158,8 @@ async def read_and_validate_estimated_end_time(self, step):
158
158
if self .current_area is NullValue :
159
159
asserts .assert_true (estimated_end_time is NullValue ,
160
160
"EstimatedEndTime should be null if CurrentArea is null." )
161
- else :
161
+
162
+ if estimated_end_time is not NullValue :
162
163
# allow for some clock skew
163
164
asserts .assert_true (estimated_end_time >= read_time - 3 * 60 ,
164
165
f"EstimatedEndTime({ estimated_end_time } ) should be greater than the time when it was read({ read_time } )" )
You can’t perform that action at this time.
0 commit comments