Files
odoo_source/odoo/addons/test_documentation_examples/tests/test_inheritance.py
T
Martin Trigaux c060e90d81 [FIX] doc: correctly link doc and test lines
The test is surprisingly formated but it is to be able to extract the relevant
lines in the documentation
2017-06-16 15:14:27 +02:00

23 lines
581 B
Python

# -*- coding: utf-8 -*-
# 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):
env = self.env
a = env['inheritance.0'].create({'name': 'A'})
b = env['inheritance.1'].create({'name': 'B'})
self.assertEqual(
a.call()
,
"This is model 0 record A"
)
self.assertEqual(
b.call()
,
"This is model 1 record B"
)