Commit 9d9d36d2 authored by Jérome Perrin's avatar Jérome Perrin

test with a real empty mapping, and adapt to the new behaviour (a simple redirect)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31587 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf477a91
......@@ -347,12 +347,20 @@ class TestOOoImport(ERP5TypeTestCase):
def stepImportFileNoMapping(self, sequence=None, sequence_list=None, **kw):
f = makeFileUpload('import_data_list.ods')
#self.logMessage("f : %s" % str(f))
person_module = self.getPortal().person_module
person_module.Base_importFile(import_file=f, listbox=())
self.assertRaises(ConversionError, person_module.Base_importFile, import_file=f, listbox=())
#self.logMessage("Validation failed : %s" % kw)
listbox = (
{ 'listbox_key': '001',
'portal_type_property_list': ''},
{ 'listbox_key': '002',
'portal_type_property_list': ''},
{ 'listbox_key': '003',
'portal_type_property_list': ''},
{ 'listbox_key': '004',
'portal_type_property_list': ''},)
redirect = person_module.Base_importFile(import_file=f, listbox=listbox)
self.assertTrue(redirect.endswith(
'portal_status_message=Please%20Define%20a%20mapping.'))
def stepImportFileWithBlankLine(self, sequence=None, sequence_list=None, **kw):
f = makeFileUpload('import_data_list_blank_line.ods')
......
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