Drop @bind_hass
use from hassio component (#111522)
* Drop `@bind_hass` use from hassio component * Add comment why we import locally --------- Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
0e329d2572
commit
4e4345f04e
6 changed files with 35 additions and 51 deletions
|
@ -15,7 +15,9 @@ from homeassistant.components.hassio import (
|
|||
DOMAIN,
|
||||
STORAGE_KEY,
|
||||
async_get_addon_store_info,
|
||||
get_core_info,
|
||||
hostname_from_addon_slug,
|
||||
is_hassio,
|
||||
)
|
||||
from homeassistant.components.hassio.const import REQUEST_REFRESH_DELAY
|
||||
from homeassistant.components.hassio.handler import HassioAPIError
|
||||
|
@ -246,8 +248,8 @@ async def test_setup_api_ping(
|
|||
|
||||
assert result
|
||||
assert aioclient_mock.call_count == 19
|
||||
assert hass.components.hassio.get_core_info()["version_latest"] == "1.0.0"
|
||||
assert hass.components.hassio.is_hassio()
|
||||
assert get_core_info(hass)["version_latest"] == "1.0.0"
|
||||
assert is_hassio(hass)
|
||||
|
||||
|
||||
async def test_setup_api_panel(
|
||||
|
@ -465,7 +467,7 @@ async def test_warn_when_cannot_connect(
|
|||
result = await async_setup_component(hass, "hassio", {})
|
||||
assert result
|
||||
|
||||
assert hass.components.hassio.is_hassio()
|
||||
assert is_hassio(hass)
|
||||
assert "Not connected with the supervisor / system too busy!" in caplog.text
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue