Commit 65f579d4 authored by Jérome Perrin's avatar Jérome Perrin

keys from dictionnaries in the list of category info returned by...

keys from dictionnaries in the list of category info returned by Base_getCategoriesSpreadSheetMapping must be strings, not unicode

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22668 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1d8be91
......@@ -174,7 +174,7 @@ for table_name in spreadsheets.keys():\n
# started, that seems the path definition has ended\n
if \'path_0\' in property_map.values():\n
path_index == None\n
property_map[column_index] = column_id\n
property_map[column_index] = column_id.encode(\'utf8\')\n
column_index += 1\n
\n
# Construct categories data (with absolute path) from table lines\n
......
917
\ No newline at end of file
918
\ No newline at end of file
......@@ -220,6 +220,8 @@ class TestOOoImport(ERP5TypeTestCase):
# strings are encoded in UTF8
self.assertTrue(isinstance(region[1]['title'], str))
self.assertTrue(isinstance(region[1]['path'], str))
for k in region[1].keys():
self.assertTrue(isinstance(k, str), (k, type(k)))
def test_CategoryTool_importCategoryFile(self):
# tests simple use of CategoryTool_importCategoryFile script
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment