Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# Copyright 2013-2019 Camptocamp SA
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
from odoo.addons.component.tests.common import TransactionComponentCase
from odoo.addons.test_component.components.components import UserTestComponent
class TestComponentCollection(TransactionComponentCase):
def setUp(self):
super().setUp()
self.collection = self.env["test.component.collection"].create({"name": "Test"})
def tearDown(self):
super().tearDown()
def test_component_by_name(self):
with self.collection.work_on("res.users") as work:
component = work.component_by_name(name="test.user.component")
self.assertEqual(UserTestComponent._name, component._name)
def test_components_usage(self):
with self.collection.work_on("res.users") as work:
component = work.component(usage="test1")
self.assertEqual(UserTestComponent._name, component._name)