diff --git a/tests/components/motionblinds_ble/conftest.py b/tests/components/motionblinds_ble/conftest.py index d8b0d0e2c56..8cd1adb1c0e 100644 --- a/tests/components/motionblinds_ble/conftest.py +++ b/tests/components/motionblinds_ble/conftest.py @@ -19,13 +19,18 @@ def motion_blinds_connect_fixture(enable_bluetooth): bleak_scanner = AsyncMock() bleak_scanner.discover.return_value = [device] - with patch( - "homeassistant.components.motionblinds_ble.config_flow.bluetooth.async_scanner_count", - return_value=1, - ), patch( - "homeassistant.components.motionblinds_ble.config_flow.bluetooth.async_get_scanner", - return_value=bleak_scanner, - ), patch( - "homeassistant.components.motionblinds_ble.async_setup_entry", return_value=True + with ( + patch( + "homeassistant.components.motionblinds_ble.config_flow.bluetooth.async_scanner_count", + return_value=1, + ), + patch( + "homeassistant.components.motionblinds_ble.config_flow.bluetooth.async_get_scanner", + return_value=bleak_scanner, + ), + patch( + "homeassistant.components.motionblinds_ble.async_setup_entry", + return_value=True, + ), ): yield bleak_scanner, device