summaryrefslogtreecommitdiff
path: root/plugins/xsettings
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-11-14 22:14:49 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-11-14 22:14:49 +0100
commita66ab7cc0b912cb2423eb7946ee027e76dd141e7 (patch)
treedbb4ea9575a0f06bd878ecf5a8ba577bf1633a35 /plugins/xsettings
parent63e325a44e89996f026f258521dc57f016f163d7 (diff)
downloadgnome-settings-daemon-a66ab7cc0b912cb2423eb7946ee027e76dd141e7.tar.gz
tests: Compare string array consistently
The gtk modules xsetting may contain a ':' separated list of modules, where the order is meaningless. In order to avoid tripping with the unexpected order, split and sort it before doing our checks.
Diffstat (limited to 'plugins/xsettings')
-rwxr-xr-xplugins/xsettings/test.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/xsettings/test.py b/plugins/xsettings/test.py
index 2f203793..ae58bb78 100755
--- a/plugins/xsettings/test.py
+++ b/plugins/xsettings/test.py
@@ -153,8 +153,10 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
time.sleep(1)
# Check that both PK and canberra plugin are enabled
- self.assertEqual(self.obj_xsettings_props.Get('org.gtk.Settings', 'Modules'),
- dbus.String('pk-gtk-module:canberra-gtk-module', variant_level=1))
+ retval = self.obj_xsettings_props.Get('org.gtk.Settings', 'Modules')
+ values = sorted(str(retval).split(':'))
+ self.assertEqual(values[0], 'canberra-gtk-module')
+ self.assertEqual(values[1], 'pk-gtk-module')
def test_enable_animations(self):
# Check that "Enable animations" is off