mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix airnow test fixture (#101458)
This commit is contained in:
parent
2464232f24
commit
7f912cb669
@ -6,7 +6,6 @@ import pytest
|
|||||||
|
|
||||||
from homeassistant.components.airnow import DOMAIN
|
from homeassistant.components.airnow import DOMAIN
|
||||||
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS
|
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, load_fixture
|
from tests.common import MockConfigEntry, load_fixture
|
||||||
|
|
||||||
@ -60,8 +59,6 @@ def mock_api_get_fixture(data):
|
|||||||
async def setup_airnow_fixture(hass, config, mock_api_get):
|
async def setup_airnow_fixture(hass, config, mock_api_get):
|
||||||
"""Define a fixture to set up AirNow."""
|
"""Define a fixture to set up AirNow."""
|
||||||
with patch("pyairnow.WebServiceAPI._get", mock_api_get), patch(
|
with patch("pyairnow.WebServiceAPI._get", mock_api_get), patch(
|
||||||
"homeassistant.components.airnow.config_flow.WebServiceAPI._get", mock_api_get
|
"homeassistant.components.airnow.PLATFORMS", []
|
||||||
), patch("homeassistant.components.airnow.PLATFORMS", []):
|
):
|
||||||
assert await async_setup_component(hass, DOMAIN, config)
|
|
||||||
await hass.async_block_till_done()
|
|
||||||
yield
|
yield
|
||||||
|
@ -15,6 +15,7 @@ async def test_entry_diagnostics(
|
|||||||
snapshot: SnapshotAssertion,
|
snapshot: SnapshotAssertion,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test config entry diagnostics."""
|
"""Test config entry diagnostics."""
|
||||||
|
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||||
assert (
|
assert (
|
||||||
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
||||||
== snapshot
|
== snapshot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user