[gnome-settings-daemon/gnome-3-30] tests: Compare string array consistently



commit bb9ea2b33e83918a0d49ac2bb111b5cfe1662a0f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Nov 14 22:14:49 2018 +0100

    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.
    
    (cherry picked from commit a66ab7cc0b912cb2423eb7946ee027e76dd141e7)

 plugins/xsettings/test.py | 6 ++++--
 1 file 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


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