From f0dda4f875c13947d47cf91a58e9a834a5e4a92c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 5 Jul 2020 12:55:44 -0500 Subject: [PATCH] Fix flapping demo geo_location test (#37516) --- tests/components/demo/test_geo_location.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/components/demo/test_geo_location.py b/tests/components/demo/test_geo_location.py index dd4c2022c5e..7ca870bc34f 100644 --- a/tests/components/demo/test_geo_location.py +++ b/tests/components/demo/test_geo_location.py @@ -1,6 +1,8 @@ """The tests for the demo platform.""" import unittest +import pytest + from homeassistant.components import geo_location from homeassistant.components.demo.geo_location import ( DEFAULT_UPDATE_INTERVAL, @@ -20,6 +22,12 @@ from tests.common import ( CONFIG = {geo_location.DOMAIN: [{"platform": "demo"}]} +@pytest.fixture(autouse=True) +def mock_legacy_time(legacy_patchable_time): + """Make time patchable for all the tests.""" + yield + + class TestDemoPlatform(unittest.TestCase): """Test the demo platform."""