summaryrefslogtreecommitdiff
path: root/addons/mail/tests
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-04-15 09:36:59 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-22 08:40:04 +0000
commit42b5ec03845ecd5b31c0f9202cb4be47329bd240 (patch)
tree555ef62bf4f87cfccdd1b7c39da19230ef8663ab /addons/mail/tests
parent7c3a0daaa1a2ed9c23267874842ca431819e0a10 (diff)
[LNT] mail: lint and reorder mail_notification files
In this commit we order fields more logically to ease reading and prepare future modifications. We also rename the class and some field strings to be more user friendly. LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891 Co-Authored-By: Rémy Voet <ryv@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Diffstat (limited to 'addons/mail/tests')
-rw-r--r--addons/mail/tests/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/tests/common.py b/addons/mail/tests/common.py
index cc5f9b0d67b..366d1a84870 100644
--- a/addons/mail/tests/common.py
+++ b/addons/mail/tests/common.py
@@ -17,7 +17,7 @@ from odoo.addons.base.models.ir_mail_server import IrMailServer, MailDeliveryExc
from odoo.addons.bus.models.bus import ImBus, json_dump
from odoo.addons.mail.models.mail_mail import MailMail
from odoo.addons.mail.models.mail_message import Message
-from odoo.addons.mail.models.mail_notification import Notification
+from odoo.addons.mail.models.mail_notification import MailNotification
from odoo.tests import common, new_test_user
from odoo.tools import formataddr, pycompat
@@ -284,7 +284,7 @@ class MailCase(MockEmail):
@contextmanager
def mock_mail_app(self):
message_create_origin = Message.create
- notification_create_origin = Notification.create
+ notification_create_origin = MailNotification.create
self._init_mock_mail()
def _mail_message_create(model, *args, **kwargs):
@@ -298,7 +298,7 @@ class MailCase(MockEmail):
return res
with patch.object(Message, 'create', autospec=True, wraps=Message, side_effect=_mail_message_create) as _mail_message_create_mock, \
- patch.object(Notification, 'create', autospec=True, wraps=Notification, side_effect=_mail_notification_create) as _mail_notification_create_mock:
+ patch.object(MailNotification, 'create', autospec=True, wraps=MailNotification, side_effect=_mail_notification_create) as _mail_notification_create_mock:
yield
def _init_mock_mail(self):