diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 66b3a09689b..ff4749c98ee 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -271,7 +271,7 @@ class TestMailAPIPerformance(BaseMailPerformance): 'partner_ids': [(4, customer_id)], }) - with self.assertQueryCount(__system__=24, emp=31): + with self.assertQueryCount(__system__=23, emp=29): composer.send_mail() @users('__system__', 'emp') @@ -291,7 +291,7 @@ class TestMailAPIPerformance(BaseMailPerformance): }).create({}) composer.onchange_template_id_wrapper() - with self.assertQueryCount(__system__=32, emp=39): + with self.assertQueryCount(__system__=31, emp=37): composer.send_mail() # remove created partner to ensure tests are the same each run @@ -312,7 +312,7 @@ class TestMailAPIPerformance(BaseMailPerformance): @warmup def test_message_assignation_inbox(self): record = self.env['mail.test.track'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=18, emp=21): + with self.assertQueryCount(__system__=17, emp=19): record.write({ 'user_id': self.user_test.id, }) @@ -368,7 +368,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__=12, emp=17): + with self.assertQueryCount(__system__=11, emp=15): record.message_post( body='

Test Post Performances with an inbox ping

', partner_ids=self.user_test.partner_id.ids, @@ -815,7 +815,7 @@ class TestMailComplexPerformance(BaseMailPerformance): messages.flush() messages.invalidate_cache() - with self.assertQueryCount(emp=17): + with self.assertQueryCount(emp=16): res = messages.message_format() self.assertEqual(len(res), 2) for message in res: @@ -836,14 +836,14 @@ class TestMailComplexPerformance(BaseMailPerformance): 'res_id': record.id } for record in records]) - with self.assertQueryCount(emp=5): + with self.assertQueryCount(emp=4): res = messages.message_format() self.assertEqual(len(res), 6) messages.flush() messages.invalidate_cache() - with self.assertQueryCount(emp=15): + with self.assertQueryCount(emp=12): res = messages.message_format() self.assertEqual(len(res), 6) @@ -932,7 +932,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=78): + with self.assertQueryCount(emp=65): self.cr.sql_log = self.warm and self.cr.sql_log_count record.with_context({}).message_post( body='

Test body

',