diff options
author | Benjamin Berg <bberg@redhat.com> | 2022-03-18 17:00:28 +0100 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2022-03-23 15:33:10 +0100 |
commit | 4b1ecfaf4e772a22fd94f5dee25cbeba47e302e9 (patch) | |
tree | 21c108aadc7cff478598b0edacef589ada30e3b1 /tests | |
parent | 946e4bbea6cc078776901459dc69fd65888b2a16 (diff) | |
download | gnome-settings-daemon-4b1ecfaf4e772a22fd94f5dee25cbeba47e302e9.tar.gz |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gsdtestcase.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |