mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-17 23:33:35 +01:00
Use dbus-fast unpack_variants option (#3885)
* Use dbus-fast unpack_variants option * More readable log on signals
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
"""Check dbus-next implementation."""
|
||||
from dbus_fast.signature import Variant
|
||||
|
||||
from supervisor.utils.dbus import DBus
|
||||
|
||||
|
||||
def test_remove_dbus_signature():
|
||||
"""Check D-Bus signature clean-up."""
|
||||
test = DBus.remove_dbus_signature(Variant("s", "Value"))
|
||||
assert isinstance(test, str)
|
||||
assert test == "Value"
|
||||
|
||||
test_dict = DBus.remove_dbus_signature({"Key": Variant("s", "Value")})
|
||||
assert isinstance(test_dict["Key"], str)
|
||||
assert test_dict["Key"] == "Value"
|
||||
|
||||
test_dict = DBus.remove_dbus_signature([Variant("s", "Value")])
|
||||
assert isinstance(test_dict[0], str)
|
||||
assert test_dict[0] == "Value"
|
||||
Reference in New Issue
Block a user