diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-10-01 11:13:49 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-10-02 16:32:53 +0200 |
| commit | fca1654dc59cf1085c2d2fbe50bc25724bee17b4 (patch) | |
| tree | dc93a4a866698339e503fffaae7474d73ace53c3 /addons/test_mass_mailing/tests | |
| parent | 4b3884b0d74a2f65d0e185db2f1aaa274258caf3 (diff) | |
[ADD] test_mass_mailing: add module to hold feature and performance tests for mass mailing
Purpose of this commit is to add the skeleton of a module holding models and
tests for mass mailing. It is build on top of test_mail in order to use
data, models and parameters already defined in it. Moreover having a
separate module allow to define test models that will not bloat production
databases.
It will soon hold unit tests for blacklist mechanism. Future commits will
gradually move tests from mass mailing module and improve them.
This commit is related to task ID 33224 (original blacklist implementation
done for v12) and its PR #25966 as well as task ID 1889703 (tests and fixes)
and its PR #27330. Done with collaboration of @dbeguin.
Diffstat (limited to 'addons/test_mass_mailing/tests')
| -rw-r--r-- | addons/test_mass_mailing/tests/__init__.py | 2 | ||||
| -rw-r--r-- | addons/test_mass_mailing/tests/common.py | 30 |
2 files changed, 32 insertions, 0 deletions
diff --git a/addons/test_mass_mailing/tests/__init__.py b/addons/test_mass_mailing/tests/__init__.py new file mode 100644 index 00000000000..67dee8c60db --- /dev/null +++ b/addons/test_mass_mailing/tests/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/addons/test_mass_mailing/tests/common.py b/addons/test_mass_mailing/tests/common.py new file mode 100644 index 00000000000..88a4ceb0735 --- /dev/null +++ b/addons/test_mass_mailing/tests/common.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.addons.test_mail.tests import common +from odoo.tests import tagged + + +@tagged('mass_mail') +class MassMailingCase(common.MockEmails, common.BaseFunctionalTest): + + @classmethod + def setUpClass(cls): + super(MassMailingCase, cls).setUpClass() + + # be sure for some common data + cls.user_employee.write({ + 'login': 'emp', + }) + + cls.user_marketing = cls.env['res.users'].with_context(cls._quick_create_user_ctx).create({ + 'name': 'Ernest Employee', + 'login': 'marketing', + 'email': 'e.e@example.com', + 'signature': '--\nErnest', + 'notification_type': 'email', + 'groups_id': [ + (6, 0, [cls.env.ref('base.group_user').id]), + (6, 0, [cls.env.ref('mass_mailing.group_mass_mailing_user').id]) + ], + }) |
