mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Fix use-maxsplit-arg pylint warnings in tests (#119366)
This commit is contained in:
parent
9af13e54c1
commit
2e9f63ced6
@ -196,8 +196,7 @@ MOCK_INCLUDE_NO_APPS = {
|
|||||||
|
|
||||||
VIZIO_ZEROCONF_SERVICE_TYPE = "_viziocast._tcp.local."
|
VIZIO_ZEROCONF_SERVICE_TYPE = "_viziocast._tcp.local."
|
||||||
ZEROCONF_NAME = f"{NAME}.{VIZIO_ZEROCONF_SERVICE_TYPE}"
|
ZEROCONF_NAME = f"{NAME}.{VIZIO_ZEROCONF_SERVICE_TYPE}"
|
||||||
ZEROCONF_HOST = HOST.split(":")[0]
|
ZEROCONF_HOST, ZEROCONF_PORT = HOST.split(":", maxsplit=2)
|
||||||
ZEROCONF_PORT = HOST.split(":")[1]
|
|
||||||
|
|
||||||
MOCK_ZEROCONF_SERVICE_INFO = zeroconf.ZeroconfServiceInfo(
|
MOCK_ZEROCONF_SERVICE_INFO = zeroconf.ZeroconfServiceInfo(
|
||||||
ip_address=ip_address(ZEROCONF_HOST),
|
ip_address=ip_address(ZEROCONF_HOST),
|
||||||
|
@ -81,7 +81,7 @@ async def test_dryer_sensor_values(
|
|||||||
|
|
||||||
state = await update_sensor_state(hass, entity_id, mock_instance)
|
state = await update_sensor_state(hass, entity_id, mock_instance)
|
||||||
assert state is not None
|
assert state is not None
|
||||||
state_id = f"{entity_id.split('_')[0]}_end_time"
|
state_id = f"{entity_id.split('_', maxsplit=1)[0]}_end_time"
|
||||||
state = hass.states.get(state_id)
|
state = hass.states.get(state_id)
|
||||||
assert state.state == thetimestamp.isoformat()
|
assert state.state == thetimestamp.isoformat()
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ async def test_washer_sensor_values(
|
|||||||
|
|
||||||
state = await update_sensor_state(hass, entity_id, mock_instance)
|
state = await update_sensor_state(hass, entity_id, mock_instance)
|
||||||
assert state is not None
|
assert state is not None
|
||||||
state_id = f"{entity_id.split('_')[0]}_end_time"
|
state_id = f"{entity_id.split('_', maxsplit=1)[0]}_end_time"
|
||||||
state = hass.states.get(state_id)
|
state = hass.states.get(state_id)
|
||||||
assert state.state == thetimestamp.isoformat()
|
assert state.state == thetimestamp.isoformat()
|
||||||
|
|
||||||
state_id = f"{entity_id.split('_')[0]}_detergent_level"
|
state_id = f"{entity_id.split('_', maxsplit=1)[0]}_detergent_level"
|
||||||
entry = entity_registry.async_get(state_id)
|
entry = entity_registry.async_get(state_id)
|
||||||
assert entry
|
assert entry
|
||||||
assert entry.disabled
|
assert entry.disabled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user