def test_now(self):
        dt_util.set_default_time_zone(dt_util.get_time_zone(TEST_TIME_ZONE))

        self.assertAlmostEqual(
            dt_util.as_utc(dt_util.now()).replace(tzinfo=None),
            datetime.utcnow(),
            delta=timedelta(seconds=1))
Test the now method.
dataset/ETHPy150Open home-assistant/home-assistant/tests/util/test_dt.py/TestDateUtil.test_now