[at-spi2-core: 5/11] Test that asking for an unknown property gives a DBus error
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 5/11] Test that asking for an unknown property gives a DBus error
- Date: Thu, 14 Jul 2022 02:29:07 +0000 (UTC)
commit ed29a224c769fed12e7f22736fcb386031fb4c8c
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jul 13 15:05:57 2022 -0500
Test that asking for an unknown property gives a DBus error
tests/registryd/test_root_accessible.py | 7 +++++++
1 file changed, 7 insertions(+)
---
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')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]