Add coverage for legacy empty BLE advertisements

This commit is contained in:
J. Nick Koston 2023-11-26 17:59:06 -06:00
parent b3972ea070
commit d6d9a06b98
No known key found for this signature in database
1 changed files with 23 additions and 0 deletions

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()