diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 1ffea697f4a..424a465cd51 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -270,7 +270,7 @@ class TestMailAPIPerformance(BaseMailPerformance): 'partner_ids': [(4, customer_id)], }) - with self.assertQueryCount(__system__=29, emp=32): + with self.assertQueryCount(__system__=25, emp=32): composer.send_mail() @users('__system__', 'emp') @@ -290,7 +290,7 @@ class TestMailAPIPerformance(BaseMailPerformance): }).create({}) composer.onchange_template_id_wrapper() - with self.assertQueryCount(__system__=37, emp=40): + with self.assertQueryCount(__system__=33, emp=40): composer.send_mail() # remove created partner to ensure tests are the same each run @@ -331,7 +331,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_log_with_post(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=5, emp=6): + with self.assertQueryCount(__system__=3, emp=6): record.message_post( body='

Test message_post as log

', subtype_xmlid='mail.mt_note', @@ -342,7 +342,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_post_no_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=5, emp=6): + with self.assertQueryCount(__system__=3, emp=6): record.message_post( body='

Test Post Performances basic

', partner_ids=[], @@ -355,7 +355,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_post_one_email_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=30, emp=31): + with self.assertQueryCount(__system__=28, emp=31): record.message_post( body='

Test Post Performances with an email ping

', partner_ids=self.customer.ids, @@ -367,7 +367,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_post_one_inbox_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=14, emp=17): + with self.assertQueryCount(__system__=12, emp=17): record.message_post( body='

Test Post Performances with an inbox ping

', partner_ids=self.user_test.partner_id.ids, @@ -951,7 +951,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance): ] self.attachements = self.env['ir.attachment'].with_user(self.env.user).create(self.vals) attachement_ids = self.attachements.ids - with self.assertQueryCount(emp=81): + with self.assertQueryCount(emp=79): self.cr.sql_log = self.warm and self.cr.sql_log_count record.with_context({}).message_post( body='

Test body

',