mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 12:52:05 +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,20 @@
|
|||
# Copyright 2023 Camptocamp SA
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from odoo.addons.component.utils import is_component_registry_ready
|
||||
|
||||
from .common import TransactionComponentRegistryCase
|
||||
|
||||
|
||||
class TestUtils(TransactionComponentRegistryCase):
|
||||
def test_registry_ready(self):
|
||||
path = "odoo.addons.component.utils.get_component_registry"
|
||||
with mock.patch(path) as mocked:
|
||||
mocked.return_value = None
|
||||
self.assertFalse(is_component_registry_ready(self.env.cr.dbname))
|
||||
self._setup_registry(self)
|
||||
mocked.return_value = self.comp_registry
|
||||
self.assertTrue(is_component_registry_ready(self.env.cr.dbname))
|
||||
self._teardown_registry(self)
|
||||
Loading…
Add table
Add a link
Reference in a new issue