mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ from tests.common import MockConfigEntry, async_fire_time_changed, load_fixture
|
||||
"datapoint.Forecast.datetime.datetime",
|
||||
Mock(now=Mock(return_value=datetime(2020, 4, 25, 12, tzinfo=timezone.utc))),
|
||||
)
|
||||
async def test_site_cannot_connect(hass, requests_mock):
|
||||
async def test_site_cannot_connect(hass, requests_mock, legacy_patchable_time):
|
||||
"""Test we handle cannot connect error."""
|
||||
|
||||
requests_mock.get("/public/data/val/wxfcs/all/json/sitelist/", text="")
|
||||
@@ -42,7 +42,7 @@ async def test_site_cannot_connect(hass, requests_mock):
|
||||
"datapoint.Forecast.datetime.datetime",
|
||||
Mock(now=Mock(return_value=datetime(2020, 4, 25, 12, tzinfo=timezone.utc))),
|
||||
)
|
||||
async def test_site_cannot_update(hass, requests_mock):
|
||||
async def test_site_cannot_update(hass, requests_mock, legacy_patchable_time):
|
||||
"""Test we handle cannot connect error."""
|
||||
|
||||
# all metoffice test data encapsulated in here
|
||||
@@ -77,7 +77,7 @@ async def test_site_cannot_update(hass, requests_mock):
|
||||
"datapoint.Forecast.datetime.datetime",
|
||||
Mock(now=Mock(return_value=datetime(2020, 4, 25, 12, tzinfo=timezone.utc))),
|
||||
)
|
||||
async def test_one_weather_site_running(hass, requests_mock):
|
||||
async def test_one_weather_site_running(hass, requests_mock, legacy_patchable_time):
|
||||
"""Test the Met Office weather platform."""
|
||||
|
||||
# all metoffice test data encapsulated in here
|
||||
@@ -111,7 +111,7 @@ async def test_one_weather_site_running(hass, requests_mock):
|
||||
"datapoint.Forecast.datetime.datetime",
|
||||
Mock(now=Mock(return_value=datetime(2020, 4, 25, 12, tzinfo=timezone.utc))),
|
||||
)
|
||||
async def test_two_weather_sites_running(hass, requests_mock):
|
||||
async def test_two_weather_sites_running(hass, requests_mock, legacy_patchable_time):
|
||||
"""Test we handle two different weather sites both running."""
|
||||
|
||||
# all metoffice test data encapsulated in here
|
||||
|
||||
Reference in New Issue
Block a user