1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Bump bluetooth deps for bleak 0.20 (#89925)

Co-authored-by: K <z@kwi.li>
This commit is contained in:
J. Nick Koston
2023-03-20 01:06:15 -10:00
committed by GitHub
parent f3b3818d1f
commit c3043fb0ee
35 changed files with 347 additions and 258 deletions

View File

@@ -12,6 +12,7 @@ from . import (
MockBleakClient,
_get_manager,
generate_advertisement_data,
generate_ble_device,
inject_advertisement,
)
@@ -37,7 +38,7 @@ async def test_diagnostics(
"homeassistant.components.bluetooth.scanner.HaScanner.discovered_devices_and_advertisement_data",
{
"44:44:33:11:23:45": (
BLEDevice(name="x", rssi=-60, address="44:44:33:11:23:45"),
generate_ble_device(name="x", rssi=-127, address="44:44:33:11:23:45"),
generate_advertisement_data(local_name="x"),
)
},
@@ -174,7 +175,7 @@ async def test_diagnostics(
],
"details": None,
"name": "x",
"rssi": -60,
"rssi": -127,
}
],
"last_detection": ANY,
@@ -201,7 +202,7 @@ async def test_diagnostics(
],
"details": None,
"name": "x",
"rssi": -60,
"rssi": -127,
}
],
"last_detection": ANY,
@@ -228,7 +229,7 @@ async def test_diagnostics(
],
"details": None,
"name": "x",
"rssi": -60,
"rssi": -127,
}
],
"last_detection": ANY,
@@ -257,7 +258,7 @@ async def test_diagnostics_macos(
# because we cannot import the scanner class directly without it throwing an
# error if the test is not running on linux since we won't have the correct
# deps installed when testing on MacOS.
switchbot_device = BLEDevice("44:44:33:11:23:45", "wohand")
switchbot_device = generate_ble_device("44:44:33:11:23:45", "wohand")
switchbot_adv = generate_advertisement_data(
local_name="wohand", service_uuids=[], manufacturer_data={1: b"\x01"}
)
@@ -266,7 +267,7 @@ async def test_diagnostics_macos(
"homeassistant.components.bluetooth.scanner.HaScanner.discovered_devices_and_advertisement_data",
{
"44:44:33:11:23:45": (
BLEDevice(name="x", rssi=-60, address="44:44:33:11:23:45"),
generate_ble_device(name="x", rssi=-127, address="44:44:33:11:23:45"),
switchbot_adv,
)
},
@@ -404,7 +405,7 @@ async def test_diagnostics_macos(
],
"details": None,
"name": "x",
"rssi": -60,
"rssi": -127,
}
],
"last_detection": ANY,
@@ -430,7 +431,7 @@ async def test_diagnostics_remote_adapter(
) -> None:
"""Test diagnostics for remote adapter."""
manager = _get_manager()
switchbot_device = BLEDevice("44:44:33:11:23:45", "wohand")
switchbot_device = generate_ble_device("44:44:33:11:23:45", "wohand")
switchbot_adv = generate_advertisement_data(
local_name="wohand", service_uuids=[], manufacturer_data={1: b"\x01"}
)