This commit is contained in:
J. Nick Koston
2025-11-04 15:45:45 -06:00
parent 268e1ead4c
commit d7cd98ca2e

View File

@@ -1944,11 +1944,10 @@ async def test_bluetooth_discovery(
with ( with (
patch( patch(
"homeassistant.components.shelly.config_flow.async_provision_wifi", "homeassistant.components.shelly.config_flow.async_provision_wifi",
new=AsyncMock(),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.async_lookup_device_by_name", "homeassistant.components.shelly.config_flow.async_lookup_device_by_name",
new=AsyncMock(return_value=("1.1.1.1", 80)), return_value=("1.1.1.1", 80),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.get_info", "homeassistant.components.shelly.config_flow.get_info",
@@ -2093,11 +2092,10 @@ async def test_bluetooth_wifi_scan_success(
with ( with (
patch( patch(
"homeassistant.components.shelly.config_flow.async_provision_wifi", "homeassistant.components.shelly.config_flow.async_provision_wifi",
new=AsyncMock(),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.async_lookup_device_by_name", "homeassistant.components.shelly.config_flow.async_lookup_device_by_name",
new=AsyncMock(return_value=("1.1.1.1", 80)), return_value=("1.1.1.1", 80),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.get_info", "homeassistant.components.shelly.config_flow.get_info",
@@ -2178,11 +2176,10 @@ async def test_bluetooth_wifi_scan_failure(
with ( with (
patch( patch(
"homeassistant.components.shelly.config_flow.async_provision_wifi", "homeassistant.components.shelly.config_flow.async_provision_wifi",
new=AsyncMock(),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.async_lookup_device_by_name", "homeassistant.components.shelly.config_flow.async_lookup_device_by_name",
new=AsyncMock(return_value=("1.1.1.1", 80)), return_value=("1.1.1.1", 80),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.get_info", "homeassistant.components.shelly.config_flow.get_info",
@@ -2357,11 +2354,11 @@ async def test_bluetooth_wifi_provision_failure(
with ( with (
patch( patch(
"homeassistant.components.shelly.config_flow.async_provision_wifi", "homeassistant.components.shelly.config_flow.async_provision_wifi",
new=AsyncMock(side_effect=DeviceConnectionError), side_effect=DeviceConnectionError,
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.async_lookup_device_by_name", "homeassistant.components.shelly.config_flow.async_lookup_device_by_name",
new=AsyncMock(return_value=None), return_value=None,
), ),
): ):
result = await hass.config_entries.flow.async_configure( result = await hass.config_entries.flow.async_configure(
@@ -2399,11 +2396,10 @@ async def test_bluetooth_wifi_provision_failure(
with ( with (
patch( patch(
"homeassistant.components.shelly.config_flow.async_provision_wifi", "homeassistant.components.shelly.config_flow.async_provision_wifi",
new=AsyncMock(),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.async_lookup_device_by_name", "homeassistant.components.shelly.config_flow.async_lookup_device_by_name",
new=AsyncMock(return_value=("1.1.1.1", 80)), return_value=("1.1.1.1", 80),
), ),
patch( patch(
"homeassistant.components.shelly.config_flow.get_info", "homeassistant.components.shelly.config_flow.get_info",