Add coverage for legacy empty BLE advertisements (#756)

This commit is contained in:
J. Nick Koston 2023-11-26 18:00:15 -06:00 committed by GitHub
parent 3a4ea30adb
commit e93ee7f313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1375,6 +1375,29 @@ async def test_subscribe_bluetooth_le_advertisements(
address_type=1,
)
]
advs.clear()
response: message.Message = BluetoothLEAdvertisementResponse(
address=1234,
name=b"mydevice",
rssi=-50,
service_uuids=[],
service_data=[],
manufacturer_data=[],
address_type=1,
)
mock_data_received(protocol, generate_plaintext_packet(response))
assert advs == [
BluetoothLEAdvertisement(
address=1234,
name="mydevice",
rssi=-50,
service_uuids=[],
manufacturer_data={},
service_data={},
address_type=1,
)
]
unsub()