From caf11fade0e2c9979375cb5d20bae2f80af25f46 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 13 Jan 2020 13:16:21 +0000 Subject: [IMP] *: update query counts Query counts weren't adapted to recent performance changes. This commit updates the different query counts to make sure any commit changing the query counts knows it and does it on purpose. Some query counts may vary between community and enterprise and therefore have a higher value than needed in community version. closes odoo/odoo#43202 Related: odoo/enterprise#7682 Signed-off-by: Thibault Delavallee (tde) --- addons/test_mail_full/tests/test_sms_performance.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addons/test_mail_full') diff --git a/addons/test_mail_full/tests/test_sms_performance.py b/addons/test_mail_full/tests/test_sms_performance.py index 87ff9c7cdb5..2128c9fe42f 100644 --- a/addons/test_mail_full/tests/test_sms_performance.py +++ b/addons/test_mail_full/tests/test_sms_performance.py @@ -51,7 +51,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.MockSMS): def test_message_sms_record_1_partner(self): record = self.test_record.with_user(self.env.user) pids = self.customer.ids - with self.mockSMSGateway(), self.assertQueryCount(employee=22): # test_mail_enterprise: 22 + with self.mockSMSGateway(), self.assertQueryCount(employee=21): # test_mail_enterprise: 21 messages = record._message_sms( body='Performance Test', partner_ids=pids, @@ -66,7 +66,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.MockSMS): def test_message_sms_record_10_partners(self): record = self.test_record.with_user(self.env.user) pids = self.partners.ids - with self.mockSMSGateway(), self.assertQueryCount(employee=40): # test_mail_enterprise: 40 + with self.mockSMSGateway(), self.assertQueryCount(employee=39): # test_mail_enterprise: 39 messages = record._message_sms( body='Performance Test', partner_ids=pids, @@ -80,7 +80,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.MockSMS): @warmup def test_message_sms_record_default(self): record = self.test_record.with_user(self.env.user) - with self.mockSMSGateway(), self.assertQueryCount(employee=26): # test_mail_enterprise: 26 + with self.mockSMSGateway(), self.assertQueryCount(employee=24): # test_mail_enterprise: 24 messages = record._message_sms( body='Performance Test', ) @@ -142,7 +142,7 @@ class TestSMSMassPerformance(BaseMailPerformance, sms_common.MockSMS): 'mass_keep_log': False, }) - with self.mockSMSGateway(), self.assertQueryCount(employee=108): + with self.mockSMSGateway(), self.assertQueryCount(employee=106): composer.action_send_sms() @mute_logger('odoo.addons.sms.models.sms_sms') @@ -159,5 +159,5 @@ class TestSMSMassPerformance(BaseMailPerformance, sms_common.MockSMS): 'mass_keep_log': True, }) - with self.mockSMSGateway(), self.assertQueryCount(employee=159): + with self.mockSMSGateway(), self.assertQueryCount(employee=157): composer.action_send_sms() -- cgit v1.2.3