Upgrade black to 20.8b1 (#39287)
This commit is contained in:
parent
0d7eec710c
commit
1c2ebdf307
574 changed files with 4389 additions and 1725 deletions
|
@ -117,7 +117,10 @@ async def test_switchbox_on(switchbox, hass, config):
|
|||
feature_mock.async_turn_on = AsyncMock(side_effect=turn_on)
|
||||
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_ON, {"entity_id": entity_id}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
|
@ -142,7 +145,10 @@ async def test_switchbox_off(switchbox, hass, config):
|
|||
feature_mock.async_turn_off = AsyncMock(side_effect=turn_off)
|
||||
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_OFF, {"entity_id": entity_id}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_OFF,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
state = hass.states.get(entity_id)
|
||||
assert state.state == STATE_OFF
|
||||
|
@ -279,7 +285,10 @@ async def test_switchbox_d_turn_first_on(switchbox_d, hass, config):
|
|||
|
||||
feature_mocks[0].async_turn_on = AsyncMock(side_effect=turn_on0)
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_ON, {"entity_id": entity_ids[0]}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_ids[0]},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
assert hass.states.get(entity_ids[0]).state == STATE_ON
|
||||
|
@ -305,7 +314,10 @@ async def test_switchbox_d_second_on(switchbox_d, hass, config):
|
|||
|
||||
feature_mocks[1].async_turn_on = AsyncMock(side_effect=turn_on1)
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_ON, {"entity_id": entity_ids[1]}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_ids[1]},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
assert hass.states.get(entity_ids[0]).state == STATE_OFF
|
||||
|
@ -331,7 +343,10 @@ async def test_switchbox_d_first_off(switchbox_d, hass, config):
|
|||
|
||||
feature_mocks[0].async_turn_off = AsyncMock(side_effect=turn_off0)
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_OFF, {"entity_id": entity_ids[0]}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_OFF,
|
||||
{"entity_id": entity_ids[0]},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
assert hass.states.get(entity_ids[0]).state == STATE_OFF
|
||||
|
@ -357,7 +372,10 @@ async def test_switchbox_d_second_off(switchbox_d, hass, config):
|
|||
|
||||
feature_mocks[1].async_turn_off = AsyncMock(side_effect=turn_off1)
|
||||
await hass.services.async_call(
|
||||
"switch", SERVICE_TURN_OFF, {"entity_id": entity_ids[1]}, blocking=True,
|
||||
"switch",
|
||||
SERVICE_TURN_OFF,
|
||||
{"entity_id": entity_ids[1]},
|
||||
blocking=True,
|
||||
)
|
||||
assert hass.states.get(entity_ids[0]).state == STATE_ON
|
||||
assert hass.states.get(entity_ids[1]).state == STATE_OFF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue