[gnome-settings-daemon/benzea/prepare-for-new-dbusmock: 5/6] tests: Enable dconf service for new dbusmock compatibility
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/prepare-for-new-dbusmock: 5/6] tests: Enable dconf service for new dbusmock compatibility
- Date: Wed, 23 Mar 2022 14:34:33 +0000 (UTC)
commit 4b1ecfaf4e772a22fd94f5dee25cbeba47e302e9
Author: Benjamin Berg <bberg redhat com>
Date: Fri Mar 18 17:00:28 2022 +0100
tests: Enable dconf service for new dbusmock compatibility
python-dbusmock will also stop importing all session services that are
installed on the host system by default (as is already the case for
system services). With this change, the dconf service cannot be
activated anymore unless we explicitly enable the service in the
environment.
Add the appropriate call to enable the service, guarded by a check that
the method exists to be compatible with older dbusmock versions.
See: https://github.com/martinpitt/python-dbusmock/pull/108
tests/gsdtestcase.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index fab6bee2..51f18250 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -76,6 +76,10 @@ class GSDTestCase(X11SessionTestCase):
os.environ['XDG_DATA_HOME'] = os.path.join(klass.workdir, 'data')
os.environ['XDG_RUNTIME_DIR'] = os.path.join(klass.workdir, 'runtime')
+ # Make dconf discoverable (requires newer dbusmock API, is not needed otherwise)
+ if hasattr(klass, 'enable_service'):
+ klass.enable_service('ca.desrt.dconf')
+
# Copy gschema file into XDG_DATA_HOME
gschema_dir = os.path.join(os.environ['XDG_DATA_HOME'], 'glib-2.0', 'schemas')
os.makedirs(gschema_dir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]