diff options
| -rw-r--r-- | addons/crm/tests/test_crm_lead_convert_mass.py | 8 | ||||
| -rw-r--r-- | addons/hr_holidays/tests/test_company_leave.py | 2 | ||||
| -rw-r--r-- | addons/test_mail/tests/test_performance.py | 2 | ||||
| -rw-r--r-- | addons/test_mail_full/tests/test_sms_performance.py | 6 | ||||
| -rw-r--r-- | addons/test_mass_mailing/tests/test_performance.py | 8 | ||||
| -rw-r--r-- | odoo/addons/base/tests/test_ir_actions.py | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/addons/crm/tests/test_crm_lead_convert_mass.py b/addons/crm/tests/test_crm_lead_convert_mass.py index 44d6281cef2..8e007b582c2 100644 --- a/addons/crm/tests/test_crm_lead_convert_mass.py +++ b/addons/crm/tests/test_crm_lead_convert_mass.py @@ -5,7 +5,7 @@ from odoo.addons.crm.tests import common as crm_common from odoo.tests.common import tagged, users -@tagged('lead_manage') +@tagged('lead_manage', 'crm_performance') class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon): @classmethod @@ -24,7 +24,7 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon): with self.assertQueryCount(user_sales_manager=0): test_leads = self.env['crm.lead'].browse(test_leads.ids) - with self.assertQueryCount(user_sales_manager=254): # crm only: 251 + with self.assertQueryCount(user_sales_manager=251): test_leads.handle_salesmen_assignment(user_ids=user_ids, team_id=False) self.assertEqual(test_leads.team_id, self.sales_team_convert | self.sales_team_1) @@ -42,7 +42,7 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon): with self.assertQueryCount(user_sales_manager=0): test_leads = self.env['crm.lead'].browse(test_leads.ids) - with self.assertQueryCount(user_sales_manager=220): # crm only: 215 + with self.assertQueryCount(user_sales_manager=218): # still some randomness (217 spotted) - crm only: 215 test_leads.handle_salesmen_assignment(user_ids=user_ids, team_id=team_id) self.assertEqual(test_leads.team_id, self.sales_team_convert) @@ -166,7 +166,7 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon): test_leads = self._create_leads_batch(count=50, user_ids=[False]) user_ids = self.assign_users.ids - with self.assertQueryCount(user_sales_manager=1363): # crm only: 1352 + with self.assertQueryCount(user_sales_manager=1361): # still some randomness (1360 spotted) - crm only: 1352 mass_convert = self.env['crm.lead2opportunity.partner.mass'].with_context({ 'active_model': 'crm.lead', 'active_ids': test_leads.ids, diff --git a/addons/hr_holidays/tests/test_company_leave.py b/addons/hr_holidays/tests/test_company_leave.py index c34c3c93fa2..941a5595a9a 100644 --- a/addons/hr_holidays/tests/test_company_leave.py +++ b/addons/hr_holidays/tests/test_company_leave.py @@ -313,7 +313,7 @@ class TestCompanyLeave(SavepointCase): }) company_leave._compute_date_from_to() - count = 865 + count = 732 with self.assertQueryCount(__system__=count, admin=count): # Original query count: 1987 # Without tracking/activity context keys: 5154 diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index b0fad48da95..658e353a81e 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -623,7 +623,7 @@ class TestMailComplexPerformance(BaseMailPerformance): customer_id = self.customer.id user_id = self.user_portal.id - with self.assertQueryCount(__system__=109, emp=110): + with self.assertQueryCount(__system__=108, emp=109): rec = self.env['mail.test.ticket'].create({ 'name': 'Test', 'container_id': container_id, diff --git a/addons/test_mail_full/tests/test_sms_performance.py b/addons/test_mail_full/tests/test_sms_performance.py index 58a1d245e09..cfa30321987 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.SMSCase): def test_message_sms_record_1_partner(self): record = self.test_record.with_user(self.env.user) pids = self.customer.ids - with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=23): # test_mail_enterprise: 25 + with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=23): # test_mail_enterprise: 18 messages = record._message_sms( body='Performance Test', partner_ids=pids, @@ -66,7 +66,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.SMSCase): def test_message_sms_record_10_partners(self): record = self.test_record.with_user(self.env.user) pids = self.partners.ids - with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=41): # test_mail_enterprise: 43 + with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=41): messages = record._message_sms( body='Performance Test', partner_ids=pids, @@ -80,7 +80,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.SMSCase): @warmup def test_message_sms_record_default(self): record = self.test_record.with_user(self.env.user) - with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=26): # test_mail_enterprise: 28 + with self.mockSMSGateway(sms_allow_unlink=True), self.assertQueryCount(employee=26): messages = record._message_sms( body='Performance Test', ) diff --git a/addons/test_mass_mailing/tests/test_performance.py b/addons/test_mass_mailing/tests/test_performance.py index 5ae91d52aa6..9f9e26776d0 100644 --- a/addons/test_mass_mailing/tests/test_performance.py +++ b/addons/test_mass_mailing/tests/test_performance.py @@ -50,8 +50,8 @@ class TestMassMailPerformance(TestMassMailPerformanceBase): 'mailing_domain': [('id', 'in', self.mm_recs.ids)], }) - # runbot needs +50 compared to local - with self.assertQueryCount(__system__=1714, marketing=1715): + # runbot needs +51 compared to local + with self.assertQueryCount(__system__=1714, marketing=1715): # test_mass_mailing_only: 1663 - 1664 mailing.action_send_mail() self.assertEqual(mailing.sent, 50) @@ -90,8 +90,8 @@ class TestMassMailBlPerformance(TestMassMailPerformanceBase): 'mailing_domain': [('id', 'in', self.mm_recs.ids)], }) - # runbot needs +62 compared to local - with self.assertQueryCount(__system__=1993, marketing=1994): + # runbot needs +70 compared to local + with self.assertQueryCount(__system__=1992, marketing=1993): # test_mass_mailing only: 1929 - 1930 mailing.action_send_mail() self.assertEqual(mailing.sent, 50) diff --git a/odoo/addons/base/tests/test_ir_actions.py b/odoo/addons/base/tests/test_ir_actions.py index 76a6f6e2f7a..31b5eebc0ec 100644 --- a/odoo/addons/base/tests/test_ir_actions.py +++ b/odoo/addons/base/tests/test_ir_actions.py @@ -510,8 +510,8 @@ class TestCustomFields(common.TransactionCase): }) query_count = self.cr.sql_log_count - query_count - # create the related field, and assert it only takes 3 extra queries - with self.assertQueryCount(query_count + 3): + # create the related field, and assert it only takes 1 extra queries + with self.assertQueryCount(query_count + 1): self.env['ir.model.fields'].create({ 'model_id': self.env['ir.model']._get_id('res.partner'), 'name': 'x_oh_boy', |
