core/tests/components/bluetooth
J. Nick Koston 6b931b208f
Small cleanups to bluetooth internals (#92045)
* Small cleanups to bluetooth internals

Improve the performance of _async_on_advertisement

Fixes

```
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/homeassistant/components/bluetooth/wrappers.py:226: FutureWarning: This method will be removed future version, pass the callback to the BleakClient constructor instead.
    self._backend.set_disconnected_callback(

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:506: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_no_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:521: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_has_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:535: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_device.metadata["delegate"] = 0

```

* put back kwargs
2023-04-26 11:16:34 +02:00
..
fixtures Restore remote discovered devices between remote scanner restarts (#83699) 2022-12-11 09:02:55 -10:00
snapshots Add support for snapshot testing (#88323) 2023-02-17 16:35:55 -05:00
__init__.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00
conftest.py Fix Bluetooth discoveries missing between restarts (#86808) 2023-01-27 22:16:16 -05:00
test_active_update_coordinator.py Avoid starting a bluetooth poll when Home Assistant is stopping (#88819) 2023-02-26 22:02:52 -05:00
test_active_update_processor.py Avoid starting a bluetooth poll when Home Assistant is stopping (#88819) 2023-02-26 22:02:52 -05:00
test_advertisement_tracker.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00
test_api.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00
test_base_scanner.py Fix BLEDevice not getting updated when details change for remote scanners (#90815) 2023-04-05 12:19:37 +02:00
test_config_flow.py Add type hints to integration tests (part 2) (#87789) 2023-02-10 16:05:26 +01:00
test_diagnostics.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00
test_init.py Add test case for matching the shelly button (#91642) 2023-04-19 11:26:21 -04:00
test_manager.py Add test coverage for bluetooth devices being rediscoverable after they go unavailable (#91645) 2023-04-19 11:25:38 -04:00
test_models.py Small cleanups to bluetooth internals (#92045) 2023-04-26 11:16:34 +02:00
test_passive_update_coordinator.py Add type hints to integration tests (part 2) (#87789) 2023-02-10 16:05:26 +01:00
test_passive_update_processor.py Add type hints to integration tests (part 2) (#87789) 2023-02-10 16:05:26 +01:00
test_scanner.py Use bluetooth address instead of uuid on MacOS (#89926) 2023-03-20 12:07:41 +01:00
test_usage.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00
test_wrappers.py Bump bluetooth deps for bleak 0.20 (#89925) 2023-03-20 12:06:15 +01:00