1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-23 18:29:20 +01:00

Use async_load_fixture in async test functions (a) (#145718)

This commit is contained in:
epenet
2025-05-28 15:51:49 +02:00
committed by GitHub
parent c3ade400fb
commit bd5fef1ddb
11 changed files with 69 additions and 46 deletions

View File

@@ -25,7 +25,7 @@ from . import setup_integration
from tests.common import (
MockConfigEntry,
async_fire_time_changed,
load_fixture,
async_load_fixture,
snapshot_platform,
)
@@ -83,7 +83,7 @@ async def test_cloud_creates_no_switch(
assert len(hass.states.async_all()) == 0
mock_cloud_airgradient_client.get_config.return_value = Config.from_json(
load_fixture("get_config_local.json", DOMAIN)
await async_load_fixture(hass, "get_config_local.json", DOMAIN)
)
freezer.tick(timedelta(minutes=5))
@@ -93,7 +93,7 @@ async def test_cloud_creates_no_switch(
assert len(hass.states.async_all()) == 1
mock_cloud_airgradient_client.get_config.return_value = Config.from_json(
load_fixture("get_config_cloud.json", DOMAIN)
await async_load_fixture(hass, "get_config_cloud.json", DOMAIN)
)
freezer.tick(timedelta(minutes=5))