diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-12-16 12:51:47 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-16 15:58:16 +0000 |
| commit | f807b636faa889bbca1c2bcdbe6af7c4818fff7e (patch) | |
| tree | a89e8519fc925f3d4b08a1e62cc066bf8ca3bf0b /addons/mass_mailing/tests/common.py | |
| parent | 110decad006c89c6462308245a4f295c5bf570f5 (diff) | |
[IMP] mass_mailing: add some tests related to fields computation
LINKS
Task ID 2088577
PR #41877
Enterprise PR odoo/enterprise#7278
Diffstat (limited to 'addons/mass_mailing/tests/common.py')
| -rw-r--r-- | addons/mass_mailing/tests/common.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/addons/mass_mailing/tests/common.py b/addons/mass_mailing/tests/common.py new file mode 100644 index 00000000000..3eb93ea226f --- /dev/null +++ b/addons/mass_mailing/tests/common.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.addons.mail.tests.common import MailCase, mail_new_test_user +from odoo.tests.common import SavepointCase + + +class TestMassMailCommon(SavepointCase, MailCase): + + @classmethod + def setUpClass(cls): + super(TestMassMailCommon, cls).setUpClass() + + cls.user_marketing = mail_new_test_user( + cls.env, login='user_marketing', + groups='base.group_user,base.group_partner_manager,mass_mailing.group_mass_mailing_user', + name='Martial Marketing', signature='--\nMartial') + + cls.mailing_list_1 = cls.env['mailing.list'].create({ + 'name': 'List1', + 'contact_ids': [ + (0, 0, {'name': 'Déboulonneur', 'email': 'fleurus@example.com'}), + (0, 0, {'name': 'Gorramts', 'email': 'gorramts@example.com'}), + (0, 0, {'name': 'Ybrant', 'email': 'ybrant@example.com'}), + ] + }) + cls.mailing_list_2 = cls.env['mailing.list'].create({ + 'name': 'List2', + 'contact_ids': [ + (0, 0, {'name': 'Gilberte', 'email': 'gilberte@example.com'}), + (0, 0, {'name': 'Gilberte En Mieux', 'email': 'gilberte@example.com'}), + (0, 0, {'name': 'Norbert', 'email': 'norbert@example.com'}), + (0, 0, {'name': 'Ybrant', 'email': 'ybrant@example.com'}), + ] + }) + + cls.email_reply_to = 'MyCompany SomehowAlias <test.alias@test.mycompany.com>' |
