Changeset - 2f705ac720f6
[Not reviewed]
0 1 0
Lance Edgar (lance) - 4 years ago 2020-06-16 17:17:55
lance@edbob.org
Use OrderedDict in some importer tests, for consistency

otherwise python2 can bite us sometimes
1 file changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rattail/tests/importing/test_handlers.py
Show inline comments
 
# -*- 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()
0 comments (0 inline, 0 general)