tests: apply ruff format to CO2 assertions

This commit is contained in:
JayChickenK
2026-08-18 11:07:51 +02:00
parent 33a06b9ae8
commit 258cdc1647
2 changed files with 4 additions and 7 deletions
@@ -110,9 +110,9 @@ def test_co2_matches_air_monitor_mapping():
assert desc.unit == "ppm"
assert desc.state_class == "measurement"
assert desc.exists_fn is not None
assert desc.value_fn(
[{"x.com.samsung.da.type": "CO2", "x.com.samsung.da.value": ["498"]}]
) == 498
assert (
desc.value_fn([{"x.com.samsung.da.type": "CO2", "x.com.samsung.da.value": ["498"]}]) == 498
)
def test_every_air_quality_sensor_still_reads_a_plain_int():
+1 -4
View File
@@ -92,10 +92,7 @@ def test_co2_reads_when_the_items_list_includes_the_type():
desc = next(e for e in air_purifier.AIR_QUALITY.entities if e.key == "co2")
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
desc.exists_fn({"x.com.samsung.da.items": [{"x.com.samsung.da.type": "CO2"}]}, {}) is True
)