mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_archive_constraint: test performance improvement
- Include context keys for avoiding mail operations overhead.
This commit is contained in:
@@ -9,6 +9,16 @@ class TestLocationArchiveConstraint(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.env = cls.env(
|
||||
context=dict(cls.env.context, test_stock_archive_constraint=True)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user