Detect use of deprecated base_url (#35353)
* Detect use of deprecated base_url * Update get_url helper * Update core migration * Migrate all tests
This commit is contained in:
parent
1be41b9de8
commit
e56dd8ed50
21 changed files with 308 additions and 73 deletions
|
@ -5,11 +5,12 @@ from homeassistant import data_entry_flow
|
|||
from homeassistant.components import locative
|
||||
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN
|
||||
from homeassistant.components.locative import DOMAIN, TRACKER_UPDATE
|
||||
from homeassistant.config import async_process_ha_core_config
|
||||
from homeassistant.const import HTTP_OK, HTTP_UNPROCESSABLE_ENTITY
|
||||
from homeassistant.helpers.dispatcher import DATA_DISPATCHER
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.async_mock import Mock, patch
|
||||
from tests.async_mock import patch
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
|
@ -33,7 +34,9 @@ async def locative_client(loop, hass, hass_client):
|
|||
@pytest.fixture
|
||||
async def webhook_id(hass, locative_client):
|
||||
"""Initialize the Geofency component and get the webhook_id."""
|
||||
hass.config.api = Mock(base_url="http://example.com")
|
||||
await async_process_ha_core_config(
|
||||
hass, {"internal_url": "http://example.local:8123"},
|
||||
)
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
"locative", context={"source": "user"}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue