mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] base_exception_user: bump version, add unit tests
H7674
This commit is contained in:
17
base_exception_user/tests/common.py
Normal file
17
base_exception_user/tests/common.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
|
||||
# Copyright 2020 Hibou Corp.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
|
||||
def setup_test_model(env, model_clses):
|
||||
model_names = set()
|
||||
for model_cls in model_clses:
|
||||
model = model_cls._build_model(env.registry, env.cr)
|
||||
model_names.add(model._name)
|
||||
|
||||
env.registry.setup_models(env.cr)
|
||||
env.registry.init_models(
|
||||
env.cr,
|
||||
model_names,
|
||||
dict(env.context, update_custom_fields=True),
|
||||
)
|
||||
Reference in New Issue
Block a user