diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-12-01 12:55:02 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-12-01 12:55:02 +0100 |
| commit | 2f9947045896b8dfeb9b7bf4771c904665d22b47 (patch) | |
| tree | 70a47252612672e48005cb98b2072b680fa6b32f /odoo/addons/test_impex | |
| parent | 7e9e2ada32757a5db45d21b57b789826218f0498 (diff) | |
| parent | c201cf2b77cf44e9ad15165ceadde41dfaa20ceb (diff) | |
[MERGE] forward port branch 11.0 up to c201cf2b77c
Diffstat (limited to 'odoo/addons/test_impex')
| -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 9c7311319e8..a360cfd0ef4 100644 --- a/odoo/addons/test_impex/tests/test_export.py +++ b/odoo/addons/test_impex/tests/test_export.py @@ -382,9 +382,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']) @@ -402,19 +406,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): @@ -585,10 +593,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 |
