mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 13:30:43 +00:00
Remove config import from netatmo (#107972)
* Remove config import from netatmo * Fix tests
This commit is contained in:
@@ -4,7 +4,7 @@ from unittest.mock import patch
|
||||
|
||||
from pyatmo.const import ALL_SCOPES
|
||||
|
||||
from homeassistant import config_entries, data_entry_flow, setup
|
||||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant.components import zeroconf
|
||||
from homeassistant.components.netatmo import config_flow
|
||||
from homeassistant.components.netatmo.const import (
|
||||
@@ -14,17 +14,15 @@ from homeassistant.components.netatmo.const import (
|
||||
OAUTH2_AUTHORIZE,
|
||||
OAUTH2_TOKEN,
|
||||
)
|
||||
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
|
||||
from .conftest import CLIENT_ID
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
from tests.typing import ClientSessionGenerator
|
||||
|
||||
CLIENT_ID = "1234"
|
||||
CLIENT_SECRET = "5678"
|
||||
|
||||
VALID_CONFIG = {}
|
||||
|
||||
|
||||
@@ -65,14 +63,6 @@ async def test_full_flow(
|
||||
current_request_with_host: None,
|
||||
) -> None:
|
||||
"""Check full flow."""
|
||||
assert await setup.async_setup_component(
|
||||
hass,
|
||||
"netatmo",
|
||||
{
|
||||
"netatmo": {CONF_CLIENT_ID: CLIENT_ID, CONF_CLIENT_SECRET: CLIENT_SECRET},
|
||||
"http": {"base_url": "https://example.com"},
|
||||
},
|
||||
)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
"netatmo", context={"source": config_entries.SOURCE_USER}
|
||||
@@ -240,14 +230,6 @@ async def test_reauth(
|
||||
current_request_with_host: None,
|
||||
) -> None:
|
||||
"""Test initialization of the reauth flow."""
|
||||
assert await setup.async_setup_component(
|
||||
hass,
|
||||
"netatmo",
|
||||
{
|
||||
"netatmo": {CONF_CLIENT_ID: CLIENT_ID, CONF_CLIENT_SECRET: CLIENT_SECRET},
|
||||
"http": {"base_url": "https://example.com"},
|
||||
},
|
||||
)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
"netatmo", context={"source": config_entries.SOURCE_USER}
|
||||
|
||||
Reference in New Issue
Block a user