Drop UNIT_ prefix for percentage constant (#39383)
This commit is contained in:
1 parent
cdc93d7110
commit
d2b1918e9c
183 files changed
+639
-661
No files matched your search
@@ -8,7 +8,7 @@ from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
UNIT_PERCENTAGE,
|
||||
PERCENTAGE,
|
||||
)
|
||||
|
||||
from tests.async_mock import patch
|
||||
@@ -170,7 +170,7 @@ def test_sensor_icon(temperature_sensor):
|
||||
def test_unit_of_measure(default_sensor, battery_sensor):
|
||||
"""Test the unit_of_measurement property."""
|
||||
assert default_sensor.unit_of_measurement is None
|
||||
assert battery_sensor.unit_of_measurement == UNIT_PERCENTAGE
|
||||
assert battery_sensor.unit_of_measurement == PERCENTAGE
|
||||
|
||||
|
||||
def test_device_class(default_sensor, temperature_sensor, humidity_sensor):
|
||||
|
||||
Reference in new issue
Block a user