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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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