mirror of
https://github.com/home-assistant/core.git
synced 2026-04-30 21:51:29 +01:00
Use async_load_fixture in async test functions (a) (#145718)
This commit is contained in:
@@ -20,7 +20,7 @@ from . import setup_integration
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
async_fire_time_changed,
|
||||
load_fixture,
|
||||
async_load_fixture,
|
||||
snapshot_platform,
|
||||
)
|
||||
|
||||
@@ -81,7 +81,7 @@ async def test_cloud_creates_no_button(
|
||||
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))
|
||||
@@ -91,7 +91,7 @@ async def test_cloud_creates_no_button(
|
||||
assert len(hass.states.async_all()) == 2
|
||||
|
||||
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