diff --git a/openerp/addons/test_documentation_examples/__init__.py b/openerp/addons/test_documentation_examples/__init__.py index a95caccaabe..dac6d473aa4 100644 --- a/openerp/addons/test_documentation_examples/__init__.py +++ b/openerp/addons/test_documentation_examples/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- -import inheritance -import extension -import delegation +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import inheritance +from . import extension +from . import delegation diff --git a/openerp/addons/test_documentation_examples/__openerp__.py b/openerp/addons/test_documentation_examples/__openerp__.py index efd1f5a4d8d..6338847c7ca 100644 --- a/openerp/addons/test_documentation_examples/__openerp__.py +++ b/openerp/addons/test_documentation_examples/__openerp__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Documentation examples test", 'description': """ diff --git a/openerp/addons/test_documentation_examples/delegation.py b/openerp/addons/test_documentation_examples/delegation.py index 7b759787d7f..3f9ba035168 100644 --- a/openerp/addons/test_documentation_examples/delegation.py +++ b/openerp/addons/test_documentation_examples/delegation.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. -from openerp import models, fields +from odoo import models, fields class Child0(models.Model): _name = 'delegation.child0' diff --git a/openerp/addons/test_documentation_examples/extension.py b/openerp/addons/test_documentation_examples/extension.py index c634609da90..344c809026e 100644 --- a/openerp/addons/test_documentation_examples/extension.py +++ b/openerp/addons/test_documentation_examples/extension.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. -from openerp import models, fields +from odoo import models, fields class Extension0(models.Model): _name = 'extension.0' diff --git a/openerp/addons/test_documentation_examples/inheritance.py b/openerp/addons/test_documentation_examples/inheritance.py index b183e26fbed..b1586760d98 100644 --- a/openerp/addons/test_documentation_examples/inheritance.py +++ b/openerp/addons/test_documentation_examples/inheritance.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. -from openerp import models, fields +from odoo import models, fields class Inheritance0(models.Model): _name = 'inheritance.0' diff --git a/openerp/addons/test_documentation_examples/tests/__init__.py b/openerp/addons/test_documentation_examples/tests/__init__.py index b484ae38a35..a6ef30e7b07 100644 --- a/openerp/addons/test_documentation_examples/tests/__init__.py +++ b/openerp/addons/test_documentation_examples/tests/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- - +# Part of Odoo. See LICENSE file for full copyright and licensing details. from . import test_inheritance, test_extension, test_delegation diff --git a/openerp/addons/test_documentation_examples/tests/test_delegation.py b/openerp/addons/test_documentation_examples/tests/test_delegation.py index df9f7e314fd..90279f24208 100644 --- a/openerp/addons/test_documentation_examples/tests/test_delegation.py +++ b/openerp/addons/test_documentation_examples/tests/test_delegation.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -from openerp.tests import common +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.tests import common class TestDelegation(common.TransactionCase): @@ -17,16 +19,8 @@ class TestDelegation(common.TransactionCase): record = self.record # children fields can be looked up on the parent record directly - self.assertEqual( - record.field_0 - , - 0 - ) - self.assertEqual( - record.field_1 - , - 1 - ) + self.assertEqual(record.field_0, 0) + self.assertEqual(record.field_1, 1) def test_swap_child(self): env = self.env @@ -35,23 +29,11 @@ class TestDelegation(common.TransactionCase): record.write({ 'child0_id': env['delegation.child0'].create({'field_0': 42}).id }) - self.assertEqual( - record.field_0 - , - 42 - ) + self.assertEqual(record.field_0, 42) def test_write(self): record = self.record record.write({'field_1': 4}) - self.assertEqual( - record.field_1 - , - 4 - ) - self.assertEqual( - record.child1_id.field_1 - , - 4 - ) + self.assertEqual(record.field_1, 4) + self.assertEqual(record.child1_id.field_1, 4) diff --git a/openerp/addons/test_documentation_examples/tests/test_extension.py b/openerp/addons/test_documentation_examples/tests/test_extension.py index 6b977da74e7..e005f835586 100644 --- a/openerp/addons/test_documentation_examples/tests/test_extension.py +++ b/openerp/addons/test_documentation_examples/tests/test_extension.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -from openerp.tests import common +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.tests import common class TestBasicInheritance(common.TransactionCase): def test_extend_fields(self): diff --git a/openerp/addons/test_documentation_examples/tests/test_inheritance.py b/openerp/addons/test_documentation_examples/tests/test_inheritance.py index b740d003392..699c6b98ed2 100644 --- a/openerp/addons/test_documentation_examples/tests/test_inheritance.py +++ b/openerp/addons/test_documentation_examples/tests/test_inheritance.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -from openerp.tests import common +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.tests import common class TestBasicInheritance(common.TransactionCase): def test_inherit_method(self): @@ -8,17 +10,5 @@ class TestBasicInheritance(common.TransactionCase): a = env['inheritance.0'].create({'name': 'A'}) b = env['inheritance.1'].create({'name': 'B'}) - self.assertEqual( - a.call() - , - """ - This is model 0 record A - """.strip() - ) - self.assertEqual( - b.call() - , - """ - This is model 1 record B - """.strip() - ) + self.assertEqual(a.call(), "This is model 0 record A") + self.assertEqual(b.call(), "This is model 1 record B")