mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +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.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
|
||||
|
||||
@ -60,8 +59,6 @@ def mock_api_get_fixture(data):
|
||||
async def setup_airnow_fixture(hass, config, mock_api_get):
|
||||
"""Define a fixture to set up AirNow."""
|
||||
with patch("pyairnow.WebServiceAPI._get", mock_api_get), patch(
|
||||
"homeassistant.components.airnow.config_flow.WebServiceAPI._get", mock_api_get
|
||||
), patch("homeassistant.components.airnow.PLATFORMS", []):
|
||||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
await hass.async_block_till_done()
|
||||
"homeassistant.components.airnow.PLATFORMS", []
|
||||
):
|
||||
yield
|
||||
|
@ -15,6 +15,7 @@ async def test_entry_diagnostics(
|
||||
snapshot: SnapshotAssertion,
|
||||
) -> None:
|
||||
"""Test config entry diagnostics."""
|
||||
assert await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
assert (
|
||||
await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
|
||||
== snapshot
|
||||
|
Loading…
x
Reference in New Issue
Block a user