From 9d02436a72c8a8a7008d3c3da9a55246e5bc3c4b Mon Sep 17 00:00:00 2001 From: Artur Pragacz <49985303+arturpragacz@users.noreply.github.com> Date: Wed, 16 Apr 2025 19:34:14 +0200 Subject: [PATCH] Remove outdated test for locks (#143061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Franck Nijhof Co-authored-by: AbĂ­lio Costa --- tests/helpers/test_intent.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/helpers/test_intent.py b/tests/helpers/test_intent.py index bf0df305c35..aebd989c237 100644 --- a/tests/helpers/test_intent.py +++ b/tests/helpers/test_intent.py @@ -6,14 +6,14 @@ from unittest.mock import MagicMock, patch import pytest import voluptuous as vol -from homeassistant.components import conversation, light, switch +from homeassistant.components import light, switch from homeassistant.components.homeassistant.exposed_entities import async_expose_entity from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_FRIENDLY_NAME, ATTR_SUPPORTED_FEATURES, ) -from homeassistant.core import Context, HomeAssistant, State +from homeassistant.core import HomeAssistant, State from homeassistant.helpers import ( area_registry as ar, config_validation as cv, @@ -615,25 +615,6 @@ def test_async_validate_slots_no_schema() -> None: } -async def test_cant_turn_on_lock(hass: HomeAssistant) -> None: - """Test that we can't turn on entities that don't support it.""" - assert await async_setup_component(hass, "homeassistant", {}) - assert await async_setup_component(hass, "conversation", {}) - assert await async_setup_component(hass, "intent", {}) - assert await async_setup_component(hass, "lock", {}) - - hass.states.async_set( - "lock.test", "123", attributes={ATTR_FRIENDLY_NAME: "Test Lock"} - ) - - result = await conversation.async_converse( - hass, "turn on test lock", None, Context(), None - ) - - assert result.response.response_type == intent.IntentResponseType.ERROR - assert result.response.error_code == intent.IntentResponseErrorCode.NO_VALID_TARGETS - - def test_async_register(hass: HomeAssistant) -> None: """Test registering an intent and verifying it is stored correctly.""" handler = MagicMock()