tests: apply ruff format to CO2 assertions
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user