mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 14:31:59 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2019 Camptocamp SA
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
from odoo.addons.component.tests.common import TransactionComponentCase
|
||||
|
||||
|
||||
class TestComponentInheritance(TransactionComponentCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.collection = self.env["test.component.collection"].create({"name": "Test"})
|
||||
|
||||
def test_inherit_base(self):
|
||||
with self.collection.work_on("res.users") as work:
|
||||
component = work.component_by_name("base")
|
||||
self.assertEqual("test_inherit_base", component.test_inherit_base())
|
||||
|
||||
def test_inherit_component(self):
|
||||
with self.collection.work_on("res.users") as work:
|
||||
component = work.component_by_name("mapper")
|
||||
self.assertEqual(
|
||||
"test_inherit_component", component.test_inherit_component()
|
||||
)
|
||||
|
||||
def test_inherit_prototype_component(self):
|
||||
with self.collection.work_on("res.users") as work:
|
||||
component = work.component_by_name("test.mapper")
|
||||
self.assertEqual(
|
||||
"test_inherit_component", component.test_inherit_component()
|
||||
)
|
||||
self.assertEqual("test.mapper", component.name())
|
||||
Loading…
Add table
Add a link
Reference in a new issue