From c32abc00e0ecc3be544e12a621460aa1e5d9c6f9 Mon Sep 17 00:00:00 2001 From: Johan Kiviniemi Date: Fri, 27 Dec 2013 03:46:03 +0200 Subject: [PATCH] test_settings/test_manual: Match renders order with file --- test/test_settings.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/test_settings.py b/test/test_settings.py index 56430ef..3f44ec8 100644 --- a/test/test_settings.py +++ b/test/test_settings.py @@ -6,6 +6,8 @@ from overviewer_core.settingsValidators import ValidationException from overviewer_core import world from overviewer_core import rendermodes +from overviewer_core.util import OrderedDict + class SettingsTest(unittest.TestCase): def setUp(self): @@ -45,21 +47,21 @@ class SettingsTest(unittest.TestCase): self.s.set_config_item("worlds", { 'test': "test/data/settings/test_world", }) - self.s.set_config_item("renders", { - "myworld": { + self.s.set_config_item("renders", OrderedDict([ + ("myworld", { "title": "myworld title", "world": "test", "rendermode": rendermodes.normal, "northdirection": "upper-left", - }, + }), - "otherworld": { + ("otherworld", { "title": "otherworld title", "world": "test", "rendermode": rendermodes.normal, "bgcolor": "#ffffff" - }, - }) + }), + ])) self.s.set_config_item("outputdir", "/tmp/fictional/outputdir") self.assertEquals(fromfile.get_validated_config(), self.s.get_validated_config())