From 4235fa0b00bada32f19c347dedbf4c9d43948b85 Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 24 Jun 2025 09:55:32 +0200 Subject: [PATCH] Fix typos in tests --- tests/components/websocket_api/test_commands.py | 12 ++++++------ tests/helpers/test_trigger.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/components/websocket_api/test_commands.py b/tests/components/websocket_api/test_commands.py index ba9ee982075..bfb8c917f71 100644 --- a/tests/components/websocket_api/test_commands.py +++ b/tests/components/websocket_api/test_commands.py @@ -718,22 +718,22 @@ async def test_subscribe_triggers( hass: HomeAssistant, websocket_client: MockHAClientWebSocket, ) -> None: - """Test get_triggers command.""" - sun_service_descriptions = """ + """Test trigger_platforms/subscribe command.""" + sun_trigger_descriptions = """ sun: {} """ - tag_service_descriptions = """ + tag_trigger_descriptions = """ tag: {} """ def _load_yaml(fname, secrets=None): if fname.endswith("sun/triggers.yaml"): - service_descriptions = sun_service_descriptions + trigger_descriptions = sun_trigger_descriptions elif fname.endswith("tag/triggers.yaml"): - service_descriptions = tag_service_descriptions + trigger_descriptions = tag_trigger_descriptions else: raise FileNotFoundError - with io.StringIO(service_descriptions) as file: + with io.StringIO(trigger_descriptions) as file: return parse_yaml(file) mock_load_yaml.side_effect = _load_yaml diff --git a/tests/helpers/test_trigger.py b/tests/helpers/test_trigger.py index 4efe4473624..bb3d3af98c5 100644 --- a/tests/helpers/test_trigger.py +++ b/tests/helpers/test_trigger.py @@ -442,7 +442,7 @@ async def test_pluggable_action( @pytest.mark.parametrize( - "sun_service_descriptions", + "sun_trigger_descriptions", [ """ sun: @@ -476,10 +476,10 @@ async def test_pluggable_action( ], ) async def test_async_get_all_descriptions( - hass: HomeAssistant, sun_service_descriptions: str + hass: HomeAssistant, sun_trigger_descriptions: str ) -> None: """Test async_get_all_descriptions.""" - tag_service_descriptions = """ + tag_trigger_descriptions = """ tag: {} """ @@ -489,10 +489,10 @@ async def test_async_get_all_descriptions( def _load_yaml(fname, secrets=None): if fname.endswith("sun/triggers.yaml"): - service_descriptions = sun_service_descriptions + trigger_descriptions = sun_trigger_descriptions elif fname.endswith("tag/triggers.yaml"): - service_descriptions = tag_service_descriptions - with io.StringIO(service_descriptions) as file: + trigger_descriptions = tag_trigger_descriptions + with io.StringIO(trigger_descriptions) as file: return parse_yaml(file) with (