fix: data management conversion to async (#1185)

Fix test warnings left over from data management conversion to async design.
Mostly tagging async tests.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2026-07-22 14:50:55 +02:00
committed by GitHub
parent 8d72177671
commit c914bae667
12 changed files with 152 additions and 147 deletions

View File

@@ -80,11 +80,12 @@ def test_request_forecast_uses_site_and_bearer(pvforecast_instance):
assert mock_get.call_args.kwargs["params"]["format"] == "json"
def test_update_data_skips_when_disabled(pvforecast_instance, config_eos):
@pytest.mark.asyncio
async def test_update_data_skips_when_disabled(pvforecast_instance, config_eos):
config_eos.merge_settings_from_dict({"pvforecast": {"provider": "PVForecastAkkudoktor"}})
with patch.object(pvforecast_instance, "_request_forecast") as mock_req, \
patch.object(PVForecastSolcast, "update_value") as mock_update:
pvforecast_instance._update_data()
await pvforecast_instance._update_data()
mock_req.assert_not_called()
mock_update.assert_not_called()