Extract Forecast.Solar DataUpdateCoordinator into module (#83859)
This commit is contained in:
parent
78cc547782
commit
4ef7bb9bbe
6 changed files with 81 additions and 60 deletions
|
@ -60,7 +60,8 @@ def mock_forecast_solar(hass) -> Generator[None, MagicMock, None]:
|
|||
hass fixture included because it sets the time zone.
|
||||
"""
|
||||
with patch(
|
||||
"homeassistant.components.forecast_solar.ForecastSolar", autospec=True
|
||||
"homeassistant.components.forecast_solar.coordinator.ForecastSolar",
|
||||
autospec=True,
|
||||
) as forecast_solar_mock:
|
||||
forecast_solar = forecast_solar_mock.return_value
|
||||
now = datetime(2021, 6, 27, 6, 0, tzinfo=dt_util.DEFAULT_TIME_ZONE)
|
||||
|
|
|
@ -29,7 +29,7 @@ async def test_load_unload_config_entry(
|
|||
|
||||
|
||||
@patch(
|
||||
"homeassistant.components.forecast_solar.ForecastSolar.estimate",
|
||||
"homeassistant.components.forecast_solar.coordinator.ForecastSolar.estimate",
|
||||
side_effect=ForecastSolarConnectionError,
|
||||
)
|
||||
async def test_config_entry_not_ready(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue