From d17c4b550e56542dd2219cacb25e079c65305eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Nov 2015 11:41:41 +0100 Subject: [PATCH] Add MPTT test for nested create issue5095 review24571002 --- trytond/tests/test_mptt.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trytond/tests/test_mptt.py b/trytond/tests/test_mptt.py index 5cc3373f8e..f4a73e647f 100644 --- a/trytond/tests/test_mptt.py +++ b/trytond/tests/test_mptt.py @@ -181,6 +181,16 @@ class MPTTTestCase(unittest.TestCase): self.assertTrue(mock.called) + def test0070_nested_create(self): + with Transaction().start(DB_NAME, USER, context=CONTEXT): + record, = self.mptt.create([{ + 'name': 'Test nested create 1', + 'childs': [('create', [{ + 'name': 'Test nested create 1 1', + }])], + }]) + self.CheckTree() + def suite(): return unittest.TestLoader().loadTestsFromTestCase(MPTTTestCase)