Upgrade black to 20.8b1 (#39287)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-08-27 13:56:20 +02:00
1 parent 0d7eec710c
commit 1c2ebdf307
574 files changed
+4389 -1725

No files matched your search

+2 -1
View File
@@ -113,7 +113,8 @@ def patch_bond_device_ids(enabled: bool = True, return_value=None, side_effect=N
def patch_bond_device(return_value=None):
"""Patch Bond API device endpoint."""
return patch(
"homeassistant.components.bond.Bond.device", return_value=return_value,
"homeassistant.components.bond.Bond.device",
return_value=return_value,
)
+6 -2
View File
@@ -162,7 +162,8 @@ async def test_zeroconf_form(hass: core.HomeAssistant):
return_value={"bondid": "test-bond-id"}
), patch_bond_device_ids(), _patch_async_setup() as mock_setup, _patch_async_setup_entry() as mock_setup_entry:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"], {CONF_ACCESS_TOKEN: "test-token"},
result["flow_id"],
{CONF_ACCESS_TOKEN: "test-token"},
)
assert result2["type"] == "create_entry"
@@ -249,4 +250,7 @@ def _patch_async_setup():
def _patch_async_setup_entry():
return patch("homeassistant.components.bond.async_setup_entry", return_value=True,)
return patch(
"homeassistant.components.bond.async_setup_entry",
return_value=True,
)
+8 -2
View File
@@ -45,7 +45,10 @@ async def turn_fan_on(
if speed:
service_data[fan.ATTR_SPEED] = speed
await hass.services.async_call(
FAN_DOMAIN, SERVICE_TURN_ON, service_data=service_data, blocking=True,
FAN_DOMAIN,
SERVICE_TURN_ON,
service_data=service_data,
blocking=True,
)
await hass.async_block_till_done()
@@ -149,7 +152,10 @@ async def test_turn_off_fan(hass: core.HomeAssistant):
with patch_bond_action() as mock_turn_off, patch_bond_device_state():
await hass.services.async_call(
FAN_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: "fan.name_1"}, blocking=True,
FAN_DOMAIN,
SERVICE_TURN_OFF,
{ATTR_ENTITY_ID: "fan.name_1"},
blocking=True,
)
await hass.async_block_till_done()
+6 -3
View File
@@ -27,7 +27,8 @@ async def test_async_setup_no_domain_config(hass: HomeAssistant):
async def test_async_setup_raises_entry_not_ready(hass: HomeAssistant):
"""Test that it throws ConfigEntryNotReady when exception occurs during setup."""
config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
domain=DOMAIN,
data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
)
config_entry.add_to_hass(hass)
@@ -39,7 +40,8 @@ async def test_async_setup_raises_entry_not_ready(hass: HomeAssistant):
async def test_async_setup_entry_sets_up_hub_and_supported_domains(hass: HomeAssistant):
"""Test that configuring entry sets up cover domain."""
config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
domain=DOMAIN,
data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
)
with patch_bond_version(
@@ -86,7 +88,8 @@ async def test_async_setup_entry_sets_up_hub_and_supported_domains(hass: HomeAss
async def test_unload_config_entry(hass: HomeAssistant):
"""Test that configuration entry supports unloading."""
config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
domain=DOMAIN,
data={CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
)
result = await setup_bond_entity(
+4 -1
View File
@@ -165,7 +165,10 @@ async def test_brightness_support(hass: core.HomeAssistant):
async def test_brightness_not_supported(hass: core.HomeAssistant):
"""Tests that a non-dimmable light should not support the brightness feature."""
await setup_platform(
hass, LIGHT_DOMAIN, ceiling_fan("name-1"), bond_device_id="test-device-id",
hass,
LIGHT_DOMAIN,
ceiling_fan("name-1"),
bond_device_id="test-device-id",
)
state = hass.states.get("light.name_1")