From 06bdc38c6df32ac24ba9f12ec9e7543e6545d852 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 4 Nov 2022 17:59:14 +0100 Subject: [PATCH] feat: add some more test cover --- tests/test_marshaller.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/tests/test_marshaller.py b/tests/test_marshaller.py index 25c493bd..93eb91f1 100644 --- a/tests/test_marshaller.py +++ b/tests/test_marshaller.py @@ -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"],