Skip to content

Commit

Permalink
feat: add some more test cover
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 4, 2022
1 parent edbb505 commit 06bdc38
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/test_marshaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,45 @@ def test_unmarshall_large_message():
message = unmarshaller.message
unpacked = unpack_variants(message.body)
objects = unpacked[0]
assert objects["/org/bluez/hci0"] == {
"org.bluez.Adapter1": {
"Address": "00:1A:7D:DA:71:04",
"AddressType": "public",
"Alias": "homeassistant",
"Class": 2883584,
"Discoverable": False,
"DiscoverableTimeout": 180,
"Discovering": True,
"Modalias": "usb:v1D6Bp0246d053F",
"Name": "homeassistant",
"Pairable": False,
"PairableTimeout": 0,
"Powered": True,
"Roles": ["central", "peripheral"],
"UUIDs": [
"0000110e-0000-1000-8000-00805f9b34fb",
"0000110a-0000-1000-8000-00805f9b34fb",
"00001200-0000-1000-8000-00805f9b34fb",
"0000110b-0000-1000-8000-00805f9b34fb",
"00001108-0000-1000-8000-00805f9b34fb",
"0000110c-0000-1000-8000-00805f9b34fb",
"00001800-0000-1000-8000-00805f9b34fb",
"00001801-0000-1000-8000-00805f9b34fb",
"0000180a-0000-1000-8000-00805f9b34fb",
"00001112-0000-1000-8000-00805f9b34fb",
],
},
"org.bluez.GattManager1": {},
"org.bluez.LEAdvertisingManager1": {
"ActiveInstances": 0,
"SupportedIncludes": ["tx-power", "appearance", "local-name"],
"SupportedInstances": 5,
},
"org.bluez.Media1": {},
"org.bluez.NetworkServer1": {},
"org.freedesktop.DBus.Introspectable": {},
"org.freedesktop.DBus.Properties": {},
}
assert objects["/org/bluez/hci0/dev_CD_A3_FA_D1_50_56/service000b/char000c"] == {
"org.bluez.GattCharacteristic1": {
"Flags": ["read"],
Expand Down

0 comments on commit 06bdc38

Please sign in to comment.