Skip to content

Commit

Permalink
TC-TIMESYNC-2.2: Add missing step
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Sep 22, 2023
1 parent d64fd13 commit 1828e43
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")):
if utc_dut_initial is NullValue:
source = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.TimeSource)
asserts.assert_equal(source, Clusters.Objects.TimeSynchronization.Enums.TimeSourceEnum.kAdmin)


if __name__ == "__main__":
default_matter_test_main()

0 comments on commit 1828e43

Please sign in to comment.