From 4859b642d8cc4bc99091eacdc3f32dec34323033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 10 Apr 2018 12:37:29 +0200 Subject: [PATCH] [FIX] test_mail: add forgotten margin on activity test Those are notoriously prone to have a one query more-or-less behavior. --- addons/test_mail/tests/test_performance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 08871500892..bf8d5740e93 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -160,7 +160,7 @@ class TestAdvMailPerformance(TransactionCase): 'default_res_model': 'mail.test.activity', }) - with self.assertQueryCount(admin=9, emp=13): # test_mail only: 9 - 13 + with self.assertQueryCount(margin=1, admin=9, emp=13): # test_mail only: 9 - 13 activity = MailActivity.create({ 'summary': 'Test Activity', 'res_id': record.id, @@ -176,7 +176,7 @@ class TestAdvMailPerformance(TransactionCase): def test_adv_activity_mixin(self): record = self.env['mail.test.activity'].create({'name': 'Test'}) - with self.assertQueryCount(admin=9, emp=13): # test_mail only: 9 - 13 + with self.assertQueryCount(margin=1, admin=9, emp=13): # test_mail only: 9 - 13 record.action_start('Test Start') record.write({'name': 'Dupe write'})