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:
Franck Nijhof authored and GitHub committed 2020-05-08 17:52:32 +02:00
1 parent 1be41b9de8
commit e56dd8ed50
21 files changed
+308 -73

No files matched your search

+5 -3
View File
@@ -6,11 +6,10 @@ import pytest
from homeassistant import data_entry_flow
from homeassistant.components import dialogflow, intent_script
from homeassistant.config import async_process_ha_core_config
from homeassistant.core import callback
from homeassistant.setup import async_setup_component
from tests.async_mock import Mock
SESSION_ID = "a9b84cec-46b6-484e-8f31-f65dba03ae6d"
INTENT_ID = "c6a74079-a8f0-46cd-b372-5a934d23591c"
INTENT_NAME = "tests"
@@ -79,7 +78,10 @@ async def fixture(hass, aiohttp_client):
},
)
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(
"dialogflow", context={"source": "user"}
)