Drop UNIT_ prefix for percentage constant (#39383)

This commit is contained in:
springstan 2020-09-05 21:09:14 +02:00 committed by GitHub
parent cdc93d7110
commit d2b1918e9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
183 changed files with 639 additions and 661 deletions

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