[at-spi2-core: 3/17] tests/registryd/utils.py: Start moving utility functions here




commit a323173e1583dac3f5aced546ec1dcd2f5408edc
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Sep 1 14:56:33 2022 -0500

    tests/registryd/utils.py: Start moving utility functions here

 tests/registryd/test_root_accessible.py  | 6 ++----
 tests/registryd/test_root_application.py | 6 ++----
 tests/registryd/utils.py                 | 4 ++++
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/tests/registryd/test_root_accessible.py b/tests/registryd/test_root_accessible.py
index 7d1fabfe..a23a5ff8 100644
--- a/tests/registryd/test_root_accessible.py
+++ b/tests/registryd/test_root_accessible.py
@@ -7,11 +7,9 @@
 import pytest
 import dbus
 
-PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties'
-ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible'
+from utils import get_property
 
-def get_property(proxy, iface_name, prop_name):
-    return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE)
+ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible'
 
 def test_accessible_iface_properties(registry_root, session_manager):
     values = [
diff --git a/tests/registryd/test_root_application.py b/tests/registryd/test_root_application.py
index bf7adb89..2542f696 100644
--- a/tests/registryd/test_root_application.py
+++ b/tests/registryd/test_root_application.py
@@ -7,11 +7,9 @@
 import pytest
 import dbus
 
-PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties'
-APPLICATION_IFACE = 'org.a11y.atspi.Application'
+from utils import get_property
 
-def get_property(proxy, iface_name, prop_name):
-    return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE)
+APPLICATION_IFACE = 'org.a11y.atspi.Application'
 
 def test_application_iface_properties(registry_root, session_manager):
     values = [
diff --git a/tests/registryd/utils.py b/tests/registryd/utils.py
new file mode 100644
index 00000000..7245929c
--- /dev/null
+++ b/tests/registryd/utils.py
@@ -0,0 +1,4 @@
+PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties'
+
+def get_property(proxy, iface_name, prop_name):
+    return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]