From 5bc18a5aaa990b168749d5513524dfffc260e0dd Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 27 Sep 2023 11:07:44 -0400 Subject: [PATCH] TC-TIMESYNC-2.2: Add missing step (#29416) * 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 --------- Co-authored-by: Boris Zbarsky --- src/python_testing/TC_TIMESYNC_2_2.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/python_testing/TC_TIMESYNC_2_2.py b/src/python_testing/TC_TIMESYNC_2_2.py index 72b9d0978e65f3..7e63708f358a59 100644 --- a/src/python_testing/TC_TIMESYNC_2_2.py +++ b/src/python_testing/TC_TIMESYNC_2_2.py @@ -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") @@ -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()