diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-10-21 12:51:32 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-11-26 08:45:55 +0000 |
| commit | def98d2375a8a906092293f0aa1ce03bf948d2d3 (patch) | |
| tree | 2136ce434aa8ba5912f8bf3dd39bea8c71dd2909 /addons/test_mail_full | |
| parent | 8c0e92cdcdf98daa3c841af97e0bd2e4b015a1b9 (diff) | |
[IMP] test_mail: add new mail composer tests for its internals
Purpose is to have some low level tests for composer itself allowing to
ensure its behavior. We add tests notably about default values computation
in mass mailing mode as well as template_id change and values synchronization
in composer model.
In a near future composer will probably be improved (use computed fields,
rewrite part of its logic to improve performances). Having tests done before
those tasks ensure we notice every change that might happen.
Task ID-2390314
PR odoo/odoo#62061
Diffstat (limited to 'addons/test_mail_full')
| -rw-r--r-- | addons/test_mail_full/tests/common.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/addons/test_mail_full/tests/common.py b/addons/test_mail_full/tests/common.py index 10b2528b5ce..579ff6cb7ca 100644 --- a/addons/test_mail_full/tests/common.py +++ b/addons/test_mail_full/tests/common.py @@ -9,23 +9,8 @@ from odoo.addons.test_mass_mailing.tests.common import TestMassMailCommon class TestMailFullCommon(TestMassMailCommon, MassSMSCommon): @classmethod - def _create_records_for_batch(cls, model, count): - records = cls.env[model] - partners = cls.env['res.partner'] - country_id = cls.env.ref('base.be').id, - for x in range(count): - partners += cls.env['res.partner'].with_context(**cls._test_context).create({ - 'name': 'Partner_%s' % (x), - 'email': '_test_partner_%s@example.com' % (x), - 'country_id': country_id, - 'mobile': '047500%02d%02d' % (x, x) - }) - records += cls.env[model].with_context(**cls._test_context).create({ - 'name': 'Test_%s' % (x), - 'customer_id': partners[x].id, - }) - cls.records = cls._reset_mail_context(records) - cls.partners = partners + def setUpClass(cls): + super(TestMailFullCommon, cls).setUpClass() class TestRecipients(TestRecipients): |
