summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_mail_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-04-21 16:02:30 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-22 08:39:46 +0000
commitba068ee7283a36cff4b20d6c157e3b0454257f82 (patch)
tree25b91e11c55df6169220311440df5f63c9236cf8 /addons/test_mail/tests/test_mail_message.py
parent6e347b196d4bf40929d88ab2c835ba3fbc4dac7d (diff)
[REF] test_mail: rename test models to ease understanding
PURPOSE Have a cleaner test_mail addons SPECIFICATIONS Keep only mail-related tests, move odoobot in test mail full, send "update notification" tests in mail (specific to mail). Merge some test files to lessen number of files, perform light file renaming. Split test mail models file to prepare some cleaning in those models and tests. LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891
Diffstat (limited to 'addons/test_mail/tests/test_mail_message.py')
-rw-r--r--addons/test_mail/tests/test_mail_message.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/test_mail/tests/test_mail_message.py b/addons/test_mail/tests/test_mail_message.py
index 42c48aa960f..256921dd244 100644
--- a/addons/test_mail/tests/test_mail_message.py
+++ b/addons/test_mail/tests/test_mail_message.py
@@ -19,7 +19,7 @@ class TestMessageValues(TestMailCommon):
super(TestMessageValues, cls).setUpClass()
cls._init_mail_gateway()
- cls.alias_record = cls.env['mail.test'].with_context(cls._test_context).create({
+ cls.alias_record = cls.env['mail.test.container'].with_context(cls._test_context).create({
'name': 'Pigs',
'alias_name': 'pigs',
'alias_contact': 'followers',
@@ -65,7 +65,7 @@ class TestMessageValues(TestMailCommon):
@mute_logger('odoo.models.unlink')
def test_mail_message_values_document_alias(self):
msg = self.Message.create({
- 'model': 'mail.test',
+ 'model': 'mail.test.container',
'res_id': self.alias_record.id
})
self.assertIn('-openerp-%d-mail.test' % self.alias_record.id, msg.message_id.split('@')[0])
@@ -78,7 +78,7 @@ class TestMessageValues(TestMailCommon):
self.env['ir.config_parameter'].search([('key', '=', 'mail.catchall.domain')]).unlink()
msg = self.Message.create({
- 'model': 'mail.test',
+ 'model': 'mail.test.container',
'res_id': self.alias_record.id
})
self.assertIn('-openerp-%d-mail.test' % self.alias_record.id, msg.message_id.split('@')[0])
@@ -90,7 +90,7 @@ class TestMessageValues(TestMailCommon):
self.env['ir.config_parameter'].search([('key', '=', 'mail.catchall.alias')]).unlink()
msg = self.Message.create({
- 'model': 'mail.test',
+ 'model': 'mail.test.container',
'res_id': self.alias_record.id
})
self.assertIn('-openerp-%d-mail.test' % self.alias_record.id, msg.message_id.split('@')[0])
@@ -137,12 +137,12 @@ class TestMessageValues(TestMailCommon):
def test_mail_message_values_no_auto_thread(self):
msg = self.Message.create({
- 'model': 'mail.test',
+ 'model': 'mail.test.container',
'res_id': self.alias_record.id,
'no_auto_thread': True,
})
self.assertIn('reply_to', msg.message_id.split('@')[0])
- self.assertNotIn('mail.test', msg.message_id.split('@')[0])
+ self.assertNotIn('mail.test.container', msg.message_id.split('@')[0])
self.assertNotIn('-%d-' % self.alias_record.id, msg.message_id.split('@')[0])
def test_mail_message_base64_image(self):