Skip to content

Commit 59455c7

Browse files
committed
Add test_find_by_address
1 parent a52fcaf commit 59455c7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_scanner2.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ async def test_discover(bumble_peripheral: Device):
3636
assert filtered_devices[0][1].local_name == bumble_peripheral.name
3737

3838

39+
@pytest.mark.asyncio
40+
async def test_find_by_address(bumble_peripheral: Device):
41+
"""Scanner is finding the device by address."""
42+
await configure_and_power_on_bumble_peripheral(bumble_peripheral)
43+
44+
device = await BleakScanner.find_device_by_address(
45+
bumble_peripheral.static_address.to_string(), backend=BleakScannerBumble
46+
)
47+
assert device is not None
48+
49+
3950
@pytest.mark.asyncio
4051
@pytest.mark.parametrize("service_uuid_available", [True, False])
4152
async def test_discover_filter_by_service_uuid(

0 commit comments

Comments
 (0)