From 296ba18cbae66d842006e3f88a8fd1276cdfeff7 Mon Sep 17 00:00:00 2001 From: JayChickenK <19538983+JayChickenK@users.noreply.github.com> Date: Tue, 18 Aug 2026 11:10:20 +0200 Subject: [PATCH] tests: narrow exists_fn before calling it --- tests/test_air_purifier_capabilities.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_air_purifier_capabilities.py b/tests/test_air_purifier_capabilities.py index 95a3e9a..e394568 100644 --- a/tests/test_air_purifier_capabilities.py +++ b/tests/test_air_purifier_capabilities.py @@ -90,6 +90,7 @@ def test_co2_reads_when_the_items_list_includes_the_type(): assert flatten(bound, resources)["co2"] == 612 desc = next(e for e in air_purifier.AIR_QUALITY.entities if e.key == "co2") + assert desc.exists_fn is not None assert desc.exists_fn({"x.com.samsung.da.items": []}, {}) is False assert ( desc.exists_fn({"x.com.samsung.da.items": [{"x.com.samsung.da.type": "CO2"}]}, {}) is True