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:
17
tests/components/my/test_init.py
Normal file
17
tests/components/my/test_init.py
Normal 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
|
||||
)
|
||||
Reference in New Issue
Block a user