summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_performance.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-10-24 11:09:01 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-02 15:18:44 +0000
commite2b33f460d0f2359e65107f8615c7e827350b4e7 (patch)
treeaacc4e64a6253dc57f3369ba5e2cc67312dfe2ea /addons/test_mail/tests/test_performance.py
parent06f169a0ee0f7508f861c47ee2f39467df7b6dc1 (diff)
[REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE Clean posting process and improve mail.message definition and comprehension. SPECIFICATIONS In order to be more explicit subtype parameter is renamed to subtype_xmlid. It therefore clearly indicates it should be a valid subtype Xml ID. Support of ill formatted Xml IDs is removed because there is no reason to try to add some random prefix. Give something that exists or go to hell, punk ! LINKS Task ID 2071556 PR #38692
Diffstat (limited to 'addons/test_mail/tests/test_performance.py')
-rw-r--r--addons/test_mail/tests/test_performance.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py
index b7948c23a4b..cf9852d6454 100644
--- a/addons/test_mail/tests/test_performance.py
+++ b/addons/test_mail/tests/test_performance.py
@@ -331,7 +331,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
with self.assertQueryCount(__system__=5, emp=6):
record.message_post(
body='<p>Test message_post as log</p>',
- subtype='mail.mt_note',
+ subtype_xmlid='mail.mt_note',
message_type='comment')
@users('__system__', 'emp')
@@ -344,7 +344,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
body='<p>Test Post Performances basic</p>',
partner_ids=[],
message_type='comment',
- subtype='mail.mt_comment')
+ subtype_xmlid='mail.mt_comment')
@mute_logger('odoo.addons.mail.models.mail_mail', 'odoo.models.unlink')
@users('__system__', 'emp')
@@ -357,7 +357,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
body='<p>Test Post Performances with an email ping</p>',
partner_ids=self.customer.ids,
message_type='comment',
- subtype='mail.mt_comment')
+ subtype_xmlid='mail.mt_comment')
@users('__system__', 'emp')
@warmup
@@ -369,7 +369,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
body='<p>Test Post Performances with an inbox ping</p>',
partner_ids=self.user_test.partner_id.ids,
message_type='comment',
- subtype='mail.mt_comment')
+ subtype_xmlid='mail.mt_comment')
@mute_logger('odoo.models.unlink')
@users('__system__', 'emp')
@@ -476,7 +476,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
record.message_post(
body='<p>Test Post Performances</p>',
message_type='comment',
- subtype='mail.mt_comment')
+ subtype_xmlid='mail.mt_comment')
self.assertEqual(record.message_ids[0].body, '<p>Test Post Performances</p>')
self.assertEqual(record.message_ids[0].notified_partner_ids, self.partners | self.user_portal.partner_id)
@@ -823,7 +823,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance):
body='<p>Test body <img src="cid:cid1"> <img src="cid:cid2"></p>',
subject='Test Subject',
message_type='notification',
- subtype=None,
+ subtype_xmlid=None,
partner_ids=partner_ids,
channel_ids=channel_ids,
parent_id=False,