mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
committed by
GitHub
parent
27219b6962
commit
6bb4e7d62c
@@ -57,27 +57,30 @@ async def test_diagnostics(
|
||||
# error if the test is not running on linux since we won't have the correct
|
||||
# deps installed when testing on MacOS.
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={
|
||||
"org.bluez": {
|
||||
"/org/bluez/hci0": {
|
||||
"org.bluez.Adapter1": {
|
||||
"Name": "BlueZ 5.63",
|
||||
"Alias": "BlueZ 5.63",
|
||||
"Modalias": "usb:v1D6Bp0246d0540",
|
||||
"Discovering": False,
|
||||
},
|
||||
"org.bluez.AdvertisementMonitorManager1": {
|
||||
"SupportedMonitorTypes": ["or_patterns"],
|
||||
"SupportedFeatures": [],
|
||||
},
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Linux",
|
||||
),
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={
|
||||
"org.bluez": {
|
||||
"/org/bluez/hci0": {
|
||||
"org.bluez.Adapter1": {
|
||||
"Name": "BlueZ 5.63",
|
||||
"Alias": "BlueZ 5.63",
|
||||
"Modalias": "usb:v1D6Bp0246d0540",
|
||||
"Discovering": False,
|
||||
},
|
||||
"org.bluez.AdvertisementMonitorManager1": {
|
||||
"SupportedMonitorTypes": ["or_patterns"],
|
||||
"SupportedFeatures": [],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
),
|
||||
):
|
||||
entry2 = MockConfigEntry(
|
||||
domain=bluetooth.DOMAIN, data={}, unique_id="00:00:00:00:00:02"
|
||||
@@ -236,12 +239,15 @@ async def test_diagnostics_macos(
|
||||
local_name="wohand", service_uuids=[], manufacturer_data={1: b"\x01"}
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Darwin",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={},
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Darwin",
|
||||
),
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={},
|
||||
),
|
||||
):
|
||||
entry1 = MockConfigEntry(
|
||||
domain=bluetooth.DOMAIN,
|
||||
@@ -414,12 +420,15 @@ async def test_diagnostics_remote_adapter(
|
||||
MONOTONIC_TIME(),
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={},
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.platform.system",
|
||||
return_value="Linux",
|
||||
),
|
||||
patch(
|
||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||
return_value={},
|
||||
),
|
||||
):
|
||||
entry1 = hass.config_entries.async_entries(bluetooth.DOMAIN)[0]
|
||||
connector = (
|
||||
|
||||
Reference in New Issue
Block a user