summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-10-18 15:37:22 -0500
committerFederico Mena Quintero <federico@gnome.org>2022-11-07 16:31:30 -0600
commit8a8941b99fd71f74109e57717e45f69d7cc8a7ca (patch)
treea7154a556643bd0c383a3bf5cd99c304a262e0aa /tests
parent4e2172b8bd0953fd706f6c11029f9e4cfeb55407 (diff)
downloadat-spi2-core-8a8941b99fd71f74109e57717e45f69d7cc8a7ca.tar.gz
New test for the root object's Introspectable interface
Also adds the missing Socket interface to the returneed introspection data.
Diffstat (limited to 'tests')
-rw-r--r--tests/registryd/test_root_introspectable.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/registryd/test_root_introspectable.py b/tests/registryd/test_root_introspectable.py
new file mode 100644
index 00000000..64845630
--- /dev/null
+++ b/tests/registryd/test_root_introspectable.py
@@ -0,0 +1,20 @@
+import pytest
+import dbus
+import xml.etree.ElementTree as ElementTree
+
+INTROSPECTABLE_IFACE = 'org.freedesktop.DBus.Introspectable'
+
+def test_introspect(registry_root, session_manager):
+ xml_str = str(registry_root.Introspect(dbus_interface=INTROSPECTABLE_IFACE))
+ root = ElementTree.fromstring(xml_str)
+ assert root.tag == 'node'
+
+ interface_elements = root.findall('./interface')
+ iface_names = map(lambda e: e.attrib['name'], interface_elements)
+ iface_names = list(iface_names)
+ iface_names.sort()
+
+ assert iface_names == ['org.a11y.atspi.Accessible',
+ 'org.a11y.atspi.Component',
+ 'org.a11y.atspi.Socket',
+ ]