Skip to content

Commit

Permalink
TC-TIMESYNC-2.2: Add missing step (#29416)
Browse files Browse the repository at this point in the history
* TC-TIMESYNC-2.2: Add missing step

* Update src/python_testing/TC_TIMESYNC_2_2.py

* Update src/python_testing/TC_TIMESYNC_2_2.py

Co-authored-by: Boris Zbarsky <[email protected]>

---------

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
cecille and bzbarsky-apple authored Sep 27, 2023
1 parent 7b4df1c commit 24b1d03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/python_testing/TC_TIMESYNC_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ async def test_TC_TIMESYNC_2_2(self):
"Granularity out of expected range")
asserts.assert_not_equal(granularity_dut, time_cluster.Enums.GranularityEnum.kNoTimeGranularity)

self.print_step(4, "Read UTC time")
th_utc = utc_time_in_matter_epoch()
utc_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.UTCTime)
asserts.assert_is_not(utc_dut, NullValue, "Received null value for UTCTime after set")
Expand All @@ -72,6 +73,12 @@ async def test_TC_TIMESYNC_2_2(self):
tolerance = timedelta(minutes=1)
compare_time(received=utc_dut, utc=th_utc, tolerance=tolerance)

self.print_step(5, "Read time source")
if self.check_pics("TIMESYNC.S.A0002"):
source = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.TimeSource)
if utc_dut_initial is NullValue:
asserts.assert_equal(source, Clusters.Objects.TimeSynchronization.Enums.TimeSourceEnum.kAdmin)


if __name__ == "__main__":
default_matter_test_main()

0 comments on commit 24b1d03

Please sign in to comment.