summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-07-13 15:05:57 -0500
committerFederico Mena Quintero <federico@gnome.org>2022-07-13 16:15:28 -0500
commited29a224c769fed12e7f22736fcb386031fb4c8c (patch)
tree40e824201205010c264782293bab2d81cdf11695 /tests
parent6a531ebe5e097d277a7b07e142e98009d622253f (diff)
downloadat-spi2-core-ed29a224c769fed12e7f22736fcb386031fb4c8c.tar.gz
Test that asking for an unknown property gives a DBus error
Diffstat (limited to 'tests')
-rw-r--r--tests/registryd/test_root_accessible.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/registryd/test_root_accessible.py b/tests/registryd/test_root_accessible.py
index a19fcb2a..7d1fabfe 100644
--- a/tests/registryd/test_root_accessible.py
+++ b/tests/registryd/test_root_accessible.py
@@ -4,6 +4,9 @@
# in conftest.py. So, a function "def test_foo(bar)" will get a bar()
# fixture created for it.
+import pytest
+import dbus
+
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties'
ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible'
@@ -20,3 +23,7 @@ def test_accessible_iface_properties(registry_root, session_manager):
for prop_name, expected in values:
assert get_property(registry_root, ACCESSIBLE_IFACE, prop_name) == expected
+
+def test_unknown_property_yields_error(registry_root, session_manager):
+ with pytest.raises(dbus.exceptions.DBusException):
+ get_property(registry_root, ACCESSIBLE_IFACE, 'NonexistentProperty')