From 79daa2e262be0a50e02727f419f70bca4b356e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 11 Apr 2018 12:46:24 +0200 Subject: [PATCH] [IMP] test_mail: follow activities in performance tests Commit 07ae0ccc4e4b4f79cf299f2a54ad3ee5e3a250af set activities as not followed by default on records. However this has an impact on performance test that should not happen. Indeed performance tests should be based on technical decisions, not business decisions. We therefore set activities as followed by default in some advanced performance tests to always have results that can be compared. --- addons/test_mail/tests/test_performance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index bf8d5740e93..3ce8126440b 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -143,6 +143,9 @@ class TestAdvMailPerformance(TransactionCase): 'groups_id': [(6, 0, [self.env.ref('base.group_user').id])], }) + # automatically follow activities, for backward compatibility concerning query count + self.env.ref('mail.mt_activities').write({'default': True}) + @users('admin', 'emp') @warmup def test_adv_activity(self):