Remove deprecated unit system properties (#86643)

* Remove deprecated unit system properties

* Fix tests
This commit is contained in:
epenet 2023-01-27 12:09:26 +01:00 committed by GitHub
parent 3ff3834cae
commit 561fc2d771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 81 deletions

View file

@ -9,6 +9,7 @@ from homeassistant.components import config
from homeassistant.components.websocket_api.const import TYPE_RESULT
from homeassistant.const import CONF_UNIT_SYSTEM, CONF_UNIT_SYSTEM_IMPERIAL
from homeassistant.util import dt as dt_util, location
from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM
@pytest.fixture
@ -55,7 +56,7 @@ async def test_websocket_core_update(hass, client):
assert hass.config.longitude != 50
assert hass.config.elevation != 25
assert hass.config.location_name != "Huis"
assert hass.config.units.name != CONF_UNIT_SYSTEM_IMPERIAL
assert hass.config.units is not US_CUSTOMARY_SYSTEM
assert hass.config.time_zone != "America/New_York"
assert hass.config.external_url != "https://www.example.com"
assert hass.config.internal_url != "http://example.com"
@ -91,7 +92,7 @@ async def test_websocket_core_update(hass, client):
assert hass.config.longitude == 50
assert hass.config.elevation == 25
assert hass.config.location_name == "Huis"
assert hass.config.units.name == CONF_UNIT_SYSTEM_IMPERIAL
assert hass.config.units is US_CUSTOMARY_SYSTEM
assert hass.config.external_url == "https://www.example.com"
assert hass.config.internal_url == "http://example.local"
assert hass.config.currency == "USD"