diff --git a/plone/app/viewletmanager/exportimport/storage.py b/plone/app/viewletmanager/exportimport/storage.py index 3e0b500..22c1d2f 100644 --- a/plone/app/viewletmanager/exportimport/storage.py +++ b/plone/app/viewletmanager/exportimport/storage.py @@ -123,8 +123,8 @@ def _exportNode(self): output = self._doc.createElement('object') for nodename in ('order', 'hidden'): skins = getattr(self.context, '_'+nodename) - for skin in skins: - for name in skins[skin]: + for skin in sorted(skins): + for name in sorted(skins[skin]): node = self._doc.createElement(nodename) node.setAttribute('skinname', skin) node.setAttribute('manager', name) diff --git a/plone/app/viewletmanager/tests/test_exportimport.py b/plone/app/viewletmanager/tests/test_exportimport.py index 8839c06..d9db226 100644 --- a/plone/app/viewletmanager/tests/test_exportimport.py +++ b/plone/app/viewletmanager/tests/test_exportimport.py @@ -42,14 +42,14 @@ _VIEWLETS_XML = """\ + + + - - - @@ -353,11 +353,11 @@ def test_normal(self): context._files['viewlets.xml'] = self._VIEWLETS_XML importViewletSettingsStorage(context) - self.assertEqual(utility.getOrder('top', 'fancy'), - ('two', 'three', 'one')) + self.assertEqual(utility.getOrder('top', 'basic'), ('one', )) self.assertEqual(utility.getOrder('top', 'undefined (fallback)'), + ('one', )) + self.assertEqual(utility.getOrder('top', 'fancy'), ('two', 'three', 'one')) - self.assertEqual(utility.getOrder('top', 'basic'), ('one', )) self.assertEqual(utility.getHidden('top', 'light'), ('two', )) def test_fragment_skip_purge(self):