1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add get_url helper, deprecate base_url (#35224)

This commit is contained in:
Franck Nijhof
2020-05-08 02:29:47 +02:00
committed by GitHub
parent 7e4aa2409f
commit 2223592486
51 changed files with 1416 additions and 198 deletions

View File

@@ -3,6 +3,7 @@ import pytest
from homeassistant.components import konnected
from homeassistant.components.konnected import config_flow
from homeassistant.config import async_process_ha_core_config
from homeassistant.const import HTTP_NOT_FOUND
from homeassistant.setup import async_setup_component
@@ -385,6 +386,9 @@ async def test_config_passed_to_config_entry(hass):
async def test_unload_entry(hass, mock_panel):
"""Test being able to unload an entry."""
await async_process_ha_core_config(
hass, {"internal_url": "http://example.local:8123"},
)
entry = MockConfigEntry(
domain=konnected.DOMAIN, data={konnected.CONF_ID: "aabbccddeeff"}
)
@@ -563,7 +567,9 @@ async def test_api(hass, aiohttp_client, mock_panel):
async def test_state_updates_zone(hass, aiohttp_client, mock_panel):
"""Test callback view."""
await async_setup_component(hass, "http", {"http": {}})
await async_process_ha_core_config(
hass, {"internal_url": "http://example.local:8123"},
)
device_config = config_flow.CONFIG_ENTRY_SCHEMA(
{
@@ -711,7 +717,9 @@ async def test_state_updates_zone(hass, aiohttp_client, mock_panel):
async def test_state_updates_pin(hass, aiohttp_client, mock_panel):
"""Test callback view."""
await async_setup_component(hass, "http", {"http": {}})
await async_process_ha_core_config(
hass, {"internal_url": "http://example.local:8123"},
)
device_config = config_flow.CONFIG_ENTRY_SCHEMA(
{