From 2f705ac720f68621c7180ddf8f40e656088d4844 2020-06-16 17:17:55 From: Lance Edgar Date: 2020-06-16 17:17:55 Subject: [PATCH] Use OrderedDict in some importer tests, for consistency otherwise python2 can bite us sometimes --- diff --git a/rattail/tests/importing/test_handlers.py b/rattail/tests/importing/test_handlers.py index 84c882d6913064079f36fe30d3b6326f92023ca4..8068f96e3d10fb6cbaabdeed1ece6e55fdee6407 100644 --- a/rattail/tests/importing/test_handlers.py +++ b/rattail/tests/importing/test_handlers.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- from __future__ import unicode_literals, absolute_import @@ -12,6 +12,7 @@ from mock import patch, Mock from rattail.db import Session from rattail.importing import handlers, Importer from rattail.config import RattailConfig +from rattail.util import OrderedDict from rattail.tests import RattailTestCase from rattail.tests.importing import ImporterTester from rattail.tests.importing.test_importers import MockImporter @@ -357,11 +358,11 @@ class MockImportHandler(handlers.ImportHandler): class TestImportHandlerImportData(ImporterTester, unittest.TestCase): - sample_data = { - '16oz': {'upc': '00074305001161', 'description': "Apple Cider Vinegar 16oz"}, - '32oz': {'upc': '00074305001321', 'description': "Apple Cider Vinegar 32oz"}, - '1gal': {'upc': '00074305011283', 'description': "Apple Cider Vinegar 1gal"}, - } + sample_data = OrderedDict([ + ('16oz', {'upc': '00074305001161', 'description': "Apple Cider Vinegar 16oz"}), + ('32oz', {'upc': '00074305001321', 'description': "Apple Cider Vinegar 32oz"}), + ('1gal', {'upc': '00074305011283', 'description': "Apple Cider Vinegar 1gal"}), + ]) def setUp(self): self.config = RattailConfig()