Upgrade black to 20.8b1 (#39287)
This commit is contained in:
1 parent
0d7eec710c
commit
1c2ebdf307
574 files changed
+4389
-1725
No files matched your search
@@ -210,7 +210,10 @@ async def test_open(feature, hass, config):
|
||||
|
||||
feature_mock.async_update = AsyncMock()
|
||||
await hass.services.async_call(
|
||||
"cover", SERVICE_OPEN_COVER, {"entity_id": entity_id}, blocking=True,
|
||||
"cover",
|
||||
SERVICE_OPEN_COVER,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
assert hass.states.get(entity_id).state == STATE_OPENING
|
||||
|
||||
|
||||
@@ -116,7 +116,10 @@ async def test_dimmer_on(dimmer, hass, config):
|
||||
|
||||
feature_mock.async_on = AsyncMock(side_effect=turn_on)
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_ON, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
@@ -186,7 +189,10 @@ async def test_dimmer_off(dimmer, hass, config):
|
||||
|
||||
feature_mock.async_off = AsyncMock(side_effect=turn_off)
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_OFF, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_OFF,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
@@ -282,7 +288,10 @@ async def test_wlightbox_s_on(wlightbox_s, hass, config):
|
||||
|
||||
feature_mock.async_on = AsyncMock(side_effect=turn_on)
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_ON, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
@@ -523,7 +532,10 @@ async def test_wlightbox_on_to_last_color(wlightbox, hass, config):
|
||||
feature_mock.sensible_on_value = "f1e2d3e4"
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_ON, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
@@ -555,7 +567,10 @@ async def test_wlightbox_off(wlightbox, hass, config):
|
||||
feature_mock.async_off = AsyncMock(side_effect=turn_off)
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_OFF, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_OFF,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
@@ -589,7 +604,10 @@ async def test_turn_on_failure(feature, hass, config, caplog):
|
||||
|
||||
feature_mock.sensible_on_value = 123
|
||||
await hass.services.async_call(
|
||||
"light", SERVICE_TURN_ON, {"entity_id": entity_id}, blocking=True,
|
||||
"light",
|
||||
SERVICE_TURN_ON,
|
||||
{"entity_id": entity_id},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
assert (
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user