From 3342e6ddbdc35325839e26d4ee7032b6053b4250 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sun, 11 Feb 2024 21:17:54 +0100 Subject: [PATCH] Avoid calling hass internals when adding mock config entry in Fully Kiosk (#110291) --- tests/components/fully_kiosk/test_services.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/components/fully_kiosk/test_services.py b/tests/components/fully_kiosk/test_services.py index af6199f34d9..6622b400da1 100644 --- a/tests/components/fully_kiosk/test_services.py +++ b/tests/components/fully_kiosk/test_services.py @@ -163,11 +163,11 @@ async def test_service_called_with_non_fkb_target_devices( """Services raise exception when no valid devices provided.""" other_domain = "NotFullyKiosk" other_config_id = "555" - await hass.config_entries.async_add( - MockConfigEntry( - title="Not Fully Kiosk", domain=other_domain, entry_id=other_config_id - ) + other_mock_config_entry = MockConfigEntry( + title="Not Fully Kiosk", domain=other_domain, entry_id=other_config_id ) + other_mock_config_entry.add_to_hass(hass) + device_entry = device_registry.async_get_or_create( config_entry_id=other_config_id, identifiers={