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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user