summaryrefslogtreecommitdiff
path: root/odoo/addons/test_impex/tests/test_export.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-11-30 18:43:08 +0100
committerChristophe Simonis <chs@odoo.com>2017-11-30 18:43:08 +0100
commit42264d8dcb7f8d0795c84718d1fc9a5fd1aefd32 (patch)
tree216ded7eac5ba06623892aaaece74c586afd4b5e /odoo/addons/test_impex/tests/test_export.py
parente4a281b5a5f7ea44e4f25259b1a84cb0dc437ebc (diff)
parent5d7ad2b16cc3ef579a6657822b7c57b07fef4f52 (diff)
[MERGE] forward port branch saas-16 up to 5d7ad2b16cc
Diffstat (limited to 'odoo/addons/test_impex/tests/test_export.py')
-rw-r--r--odoo/addons/test_impex/tests/test_export.py43
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