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

Add my component (#46058)

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Bram Kragten
2021-02-08 14:44:46 +01:00
committed by GitHub
parent 48002f47f4
commit 6f446cf627
8 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
"""Test the my init."""
from unittest import mock
from homeassistant.components.my import URL_PATH
from homeassistant.setup import async_setup_component
async def test_setup(hass):
"""Test setup."""
with mock.patch(
"homeassistant.components.frontend.async_register_built_in_panel"
) as mock_register_panel:
assert await async_setup_component(hass, "my", {"foo": "bar"})
assert mock_register_panel.call_args == mock.call(
hass, "my", frontend_url_path=URL_PATH
)