From 6421973cd68c80572fb8a36d264a151fa3570802 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:46:26 +0200 Subject: [PATCH] Remove unnecessary patch from panel_custom tests (#146695) --- tests/components/panel_custom/test_init.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/components/panel_custom/test_init.py b/tests/components/panel_custom/test_init.py index dc0f06d2a56..7a3545620ac 100644 --- a/tests/components/panel_custom/test_init.py +++ b/tests/components/panel_custom/test_init.py @@ -1,7 +1,5 @@ """The tests for the panel_custom component.""" -from unittest.mock import Mock, patch - from homeassistant import setup from homeassistant.components import frontend, panel_custom from homeassistant.core import HomeAssistant @@ -22,14 +20,13 @@ async def test_webcomponent_custom_path_not_found(hass: HomeAssistant) -> None: } } - with patch("os.path.isfile", Mock(return_value=False)): - result = await setup.async_setup_component(hass, "panel_custom", config) - assert not result + result = await setup.async_setup_component(hass, "panel_custom", config) + assert not result - panels = hass.data.get(frontend.DATA_PANELS, []) + panels = hass.data.get(frontend.DATA_PANELS, []) - assert panels - assert "nice_url" not in panels + assert panels + assert "nice_url" not in panels async def test_js_webcomponent(hass: HomeAssistant) -> None: