From 087418c09a3b2bcd647b72c5cac33f32a673ea55 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 11 Sep 2026 07:25:45 -0500 Subject: [PATCH] [remote_base] Pin the request_protocol message and dedupe assertions --- tests/component_tests/remote_receiver/test_slot_counts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/component_tests/remote_receiver/test_slot_counts.py b/tests/component_tests/remote_receiver/test_slot_counts.py index e9bce83f03..b59513bd77 100644 --- a/tests/component_tests/remote_receiver/test_slot_counts.py +++ b/tests/component_tests/remote_receiver/test_slot_counts.py @@ -66,13 +66,15 @@ def test_every_registry_name_maps_to_a_protocol_source() -> None: def test_request_protocol_rejects_unknown_names() -> None: """A misspelled protocol would otherwise surface only as a link error.""" - with pytest.raises(ValueError, match="toshiba"): + with pytest.raises(ValueError, match="Unknown remote protocol 'toshiba'"): remote_base.request_protocol("toshiba") def test_dump_list_is_deduplicated_across_forms() -> None: dumpers = remote_base.validate_dumpers(["raw", {"raw": None}, "nec", "nec"]) - assert [name for name, _ in dumpers] == ["raw", "nec"] + assert [ + next(k for k in entry if k in remote_base.DUMPER_REGISTRY) for entry in dumpers + ] == ["raw", "nec"] @pytest.mark.parametrize("bad", [["nec", None], [5]])