summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_mail_mail.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-10-11 08:41:50 +0000
committerThibault Delavallée <tde@odoo.com>2018-10-18 13:57:02 +0000
commita7b3d1697cad1a9d5801dab1736359e9caa1ba90 (patch)
tree46b00f79605c0fc9b1d6bad7a65e3d01c9eb422e /addons/test_mail/tests/test_mail_mail.py
parent7429c61dfcd2dfda72655e33504159a637227eef (diff)
[REF] test_mail: use odoo test helper method to create test users
Purpose of this commit is to use the newly introduced helper to create test users in a quick way and reduce code duplication. A mail specific helper tool function is defined based on the standard one defined in test allowing to pass a custom context. It bypasses mailing features in order to speedup the creation. This commit is linked to task ID 1889703 and PR #27526.
Diffstat (limited to 'addons/test_mail/tests/test_mail_mail.py')
-rw-r--r--addons/test_mail/tests/test_mail_mail.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/addons/test_mail/tests/test_mail_mail.py b/addons/test_mail/tests/test_mail_mail.py
index 4debd669874..207cc80d26f 100644
--- a/addons/test_mail/tests/test_mail_mail.py
+++ b/addons/test_mail/tests/test_mail_mail.py
@@ -15,12 +15,7 @@ class TestMail(common.SavepointCase, mail_common.MockEmails):
def setUpClass(cls):
super(TestMail, cls).setUpClass()
- cls.user_employee = cls.env['res.users'].with_context({
- 'no_reset_password': True,
- 'mail_create_nolog': True,
- 'mail_create_nosubscribe': True,
- 'mail_notrack': True,
- }).create({
+ cls.user_employee = cls.env['res.users'].with_context(mail_common.BaseFunctionalTest._test_context).create({
'name': 'Ernest Employee',
'login': 'ernest',
'email': 'e.e@example.com',