Skip to content

Commit a6e0451

Browse files
committed
Update the PICS code for presets attribute
1 parent ca652c8 commit a6e0451

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/python_testing/TC_TSTAT_4_2.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ async def test_TC_TSTAT_4_2(self):
150150
# Commission DUT - already done
151151

152152
self.step("2")
153-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048")):
153+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050")):
154154
presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets)
155155
logger.info(f"Rx'd Presets: {presets}")
156156
asserts.assert_equal(presets, initial_presets, "Presets do not match initial value")
@@ -161,7 +161,7 @@ async def test_TC_TSTAT_4_2(self):
161161
asserts.assert_true(status_ok, "Presets write did not return InvalidInState as expected")
162162

163163
self.step("3")
164-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
164+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
165165
await self.send_edit_preset_request_command()
166166

167167
# Write to the presets attribute after calling StartPresetsSchedulesEditRequest command
@@ -175,7 +175,7 @@ async def test_TC_TSTAT_4_2(self):
175175
asserts.assert_equal(presets, initial_presets, "Presets were updated which is not expected")
176176

177177
self.step("4")
178-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
178+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
179179

180180
# Send the StartPresetsSchedulesEditRequest command
181181
await self.send_edit_preset_request_command()
@@ -194,7 +194,7 @@ async def test_TC_TSTAT_4_2(self):
194194
asserts.assert_equal(presets, new_presets_with_handle, "Presets were not updated which is not expected")
195195

196196
self.step("5")
197-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
197+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
198198

199199
# Send the StartPresetsSchedulesEditRequest command
200200
await self.send_edit_preset_request_command()
@@ -210,7 +210,7 @@ async def test_TC_TSTAT_4_2(self):
210210
await self.send_commit_preset_request_command(expected_status=Status.UnsupportedAccess)
211211

212212
self.step("6")
213-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C06.Rsp") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
213+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C06.Rsp") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
214214

215215
# Send the SetActivePresetRequest command
216216
await self.send_set_active_preset_handle_request_command(value=b'\x03')
@@ -234,7 +234,7 @@ async def test_TC_TSTAT_4_2(self):
234234
await self.send_commit_preset_request_command(expected_status=Status.InvalidInState)
235235

236236
self.step("7")
237-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
237+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
238238

239239
# Send the StartPresetsSchedulesEditRequest command
240240
await self.send_edit_preset_request_command()
@@ -251,7 +251,7 @@ async def test_TC_TSTAT_4_2(self):
251251
await self.send_commit_preset_request_command(expected_status=Status.UnsupportedAccess)
252252

253253
self.step("8")
254-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
254+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
255255

256256
# Send the StartPresetsSchedulesEditRequest command
257257
await self.send_edit_preset_request_command()
@@ -269,7 +269,7 @@ async def test_TC_TSTAT_4_2(self):
269269
await self.send_commit_preset_request_command(expected_status=Status.ConstraintError)
270270

271271
self.step("9")
272-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
272+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
273273

274274
# Send the StartPresetsSchedulesEditRequest command
275275
await self.send_edit_preset_request_command()
@@ -287,7 +287,7 @@ async def test_TC_TSTAT_4_2(self):
287287
await self.send_commit_preset_request_command(expected_status=Status.NotFound)
288288

289289
self.step("10")
290-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
290+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
291291

292292
# Send the StartPresetsSchedulesEditRequest command
293293
await self.send_edit_preset_request_command()
@@ -304,7 +304,7 @@ async def test_TC_TSTAT_4_2(self):
304304
await self.send_commit_preset_request_command(expected_status=Status.UnsupportedAccess)
305305

306306
self.step("11")
307-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
307+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
308308

309309
# Send the StartPresetsSchedulesEditRequest command
310310
await self.send_edit_preset_request_command()
@@ -321,7 +321,7 @@ async def test_TC_TSTAT_4_2(self):
321321
await self.send_commit_preset_request_command(expected_status=Status.ConstraintError)
322322

323323
self.step("12")
324-
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0048") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
324+
if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C07.Rsp") and self.check_pics("TSTAT.S.C09.Rsp")):
325325

326326
# Send the StartPresetsSchedulesEditRequest command
327327
await self.send_edit_preset_request_command()
@@ -341,7 +341,7 @@ async def test_TC_TSTAT_4_2(self):
341341
# Send the CommitPresetsSchedulesRequest command and expect InvalidInState as the previous edit request was cancelled
342342
await self.send_commit_preset_request_command(expected_status=Status.InvalidInState)
343343

344-
# TODO: Add tests for the total number of Presets exceeds the NumberOfPresets supported. Also Add tests for adding presets with preset scenario not present in PresetTypes.
344+
# TODO: Add tests for the total number of Presets exceeds the NumberOfPresets supported. Also Add tests for adding presets with preset scenario not present in PresetTypes.
345345

346346

347347
if __name__ == "__main__":

0 commit comments

Comments
 (0)