Drop UNIT_ prefix for percentage constant (#39383)

This commit is contained in:
springstan authored and GitHub committed 2020-09-05 21:09:14 +02:00
1 parent cdc93d7110
commit d2b1918e9c
183 files changed
+639 -661

No files matched your search

+6 -6
View File
@@ -1,6 +1,6 @@
"""The sensor tests for the nut platform."""
from homeassistant.const import UNIT_PERCENTAGE
from homeassistant.const import PERCENTAGE
from .util import async_init_integration
@@ -21,7 +21,7 @@ async def test_pr3000rt2u(hass):
"device_class": "battery",
"friendly_name": "Ups1 Battery Charge",
"state": "Online",
"unit_of_measurement": UNIT_PERCENTAGE,
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@@ -47,7 +47,7 @@ async def test_cp1350c(hass):
"device_class": "battery",
"friendly_name": "Ups1 Battery Charge",
"state": "Online",
"unit_of_measurement": UNIT_PERCENTAGE,
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@@ -152,7 +152,7 @@ async def test_cp1500pfclcd(hass):
"device_class": "battery",
"friendly_name": "Ups1 Battery Charge",
"state": "Online",
"unit_of_measurement": UNIT_PERCENTAGE,
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@@ -177,7 +177,7 @@ async def test_dl650elcd(hass):
"device_class": "battery",
"friendly_name": "Ups1 Battery Charge",
"state": "Online",
"unit_of_measurement": UNIT_PERCENTAGE,
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@@ -202,7 +202,7 @@ async def test_blazer_usb(hass):
"device_class": "battery",
"friendly_name": "Ups1 Battery Charge",
"state": "Online",
"unit_of_measurement": UNIT_PERCENTAGE,
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears