diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-11-30 15:27:59 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-11-30 15:27:59 +0100 |
| commit | ab084d580ff0edf9be1d12cec87aeffdd84459b7 (patch) | |
| tree | 6a19b4656315d94b65c88507bb471ac56d16f3ed /odoo/addons/test_impex/tests/test_export.py | |
| parent | 3f66814a0d01a81bef5456a07da4b1ac8e2281e7 (diff) | |
| parent | 98539336a5d40de748764ff0a3c16d8cda77b02f (diff) | |
[MERGE] forward port branch saas-15 up to 98539336a5d
Diffstat (limited to 'odoo/addons/test_impex/tests/test_export.py')
| -rw-r--r-- | odoo/addons/test_impex/tests/test_export.py | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/odoo/addons/test_impex/tests/test_export.py b/odoo/addons/test_impex/tests/test_export.py index 226ba9943f6..74f62bf7189 100644 --- a/odoo/addons/test_impex/tests/test_export.py +++ b/odoo/addons/test_impex/tests/test_export.py @@ -381,9 +381,13 @@ class test_o2m(CreatorCase): def test_multiple_records_name(self): self.assertEqual( self.export(self.commands, fields=['const', 'value']), - [[ - u'4', u','.join(self.names) - ]]) + [ + [u'4', u'export.one2many.child:4'], + [u'', u'export.one2many.child:42'], + [u'', u'export.one2many.child:36'], + [u'', u'export.one2many.child:4'], + [u'', u'export.one2many.child:13'], + ]) def test_multiple_records_id(self): export = self.export(self.commands, fields=['const', 'value/.id']) @@ -401,19 +405,23 @@ class test_o2m(CreatorCase): def test_multiple_records_with_name_before(self): self.assertEqual( self.export(self.commands, fields=['const', 'value', 'value/value']), - [[ # exports sub-fields of very first o2m - u'4', u','.join(self.names), u'4' - ]]) + [ + [u'4', u'export.one2many.child:4', u'4'], + ['', u'export.one2many.child:42', u'42'], + ['', u'export.one2many.child:36', u'36'], + ['', u'export.one2many.child:4', u'4'], + ['', u'export.one2many.child:13', u'13'], + ]) def test_multiple_records_with_name_after(self): self.assertEqual( self.export(self.commands, fields=['const', 'value/value', 'value']), - [ # completely ignores name_get request - [u'4', u'4', ''], - ['', u'42', ''], - ['', u'36', ''], - ['', u'4', ''], - ['', u'13', ''], + [ + [u'4', u'4', u'export.one2many.child:4'], + ['', u'42', u'export.one2many.child:42'], + ['', u'36', u'export.one2many.child:36'], + ['', u'4', u'export.one2many.child:4'], + ['', u'13', u'export.one2many.child:13'], ]) def test_multiple_subfields_neighbour(self): @@ -584,10 +592,13 @@ class test_m2m(CreatorCase): def test_multiple_records_name(self): self.assertEqual( self.export(self.commands, fields=['const', 'value']), - [[ # FIXME: hardcoded comma, import uses config.csv_internal_sep - # resolution: remove configurable csv_internal_sep - u'4', u','.join(self.names) - ]]) + [ + [u'4', u'export.many2many.other:4'], + ['', u'export.many2many.other:42'], + ['', u'export.many2many.other:36'], + ['', u'export.many2many.other:4'], + ['', u'export.many2many.other:13'], + ]) # essentially same as o2m, so boring |
