Ensure we do not actually create a BleakScanner in the usage test (#81362)

Avoids a failure when bluetooth is turned off when
testing on macos:

bleak.exc.BleakError: Bluetooth device is turned off
This commit is contained in:
J. Nick Koston
2022-11-02 14:57:59 +01:00
committed by GitHub
parent b2a4228dae
commit ab14e55c05

View File

@@ -33,7 +33,8 @@ async def test_multiple_bleak_scanner_instances(hass):
uninstall_multiple_bleak_catcher()
instance = bleak.BleakScanner()
with patch("bleak.get_platform_scanner_backend_type"):
instance = bleak.BleakScanner()
assert not isinstance(instance, HaBleakScannerWrapper)