diff --git a/addons/test_mail/tests/test_discuss.py b/addons/test_mail/tests/test_discuss.py index e2bda7dc8d9dd889ac35621deb23e8f5292d40f1..dfd4834e0ce8473472480255218b4f1b6fcf1660 100644 --- a/addons/test_mail/tests/test_discuss.py +++ b/addons/test_mail/tests/test_discuss.py @@ -2,9 +2,11 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients +from odoo.tests import tagged from odoo.tools import mute_logger +@tagged('post_install', '-at_install') class TestChatterTweaks(TestMailCommon, TestRecipients): @classmethod diff --git a/addons/test_mail/tests/test_invite.py b/addons/test_mail/tests/test_invite.py index c4e91a86173184539d4b83ce821bff08164d936b..f859676b722083402daba165552c2135ce7d9238 100644 --- a/addons/test_mail/tests/test_invite.py +++ b/addons/test_mail/tests/test_invite.py @@ -2,9 +2,11 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail.tests.common import TestMailCommon +from odoo.tests import tagged from odoo.tools import mute_logger +@tagged('post_install', '-at_install') class TestInvite(TestMailCommon): @mute_logger('odoo.addons.mail.models.mail_mail') diff --git a/addons/test_mail/tests/test_ir_actions.py b/addons/test_mail/tests/test_ir_actions.py index d67124b2153852e885b423bf79da43cab041d6e7..d189a656569ac67ddede6f617c20da7a0e65010b 100644 --- a/addons/test_mail/tests/test_ir_actions.py +++ b/addons/test_mail/tests/test_ir_actions.py @@ -3,8 +3,10 @@ from odoo.addons.base.tests.test_ir_actions import TestServerActionsBase from odoo.addons.test_mail.tests.common import TestMailCommon +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestServerActionsEmail(TestMailCommon, TestServerActionsBase): def test_action_email(self): diff --git a/addons/test_mail/tests/test_mail_activity.py b/addons/test_mail/tests/test_mail_activity.py index 7fe7ba519810b20437384c2202dde2bf7c0e6a89..b159d661fbdc823b45388dc253e33849a9c528ff 100644 --- a/addons/test_mail/tests/test_mail_activity.py +++ b/addons/test_mail/tests/test_mail_activity.py @@ -24,7 +24,7 @@ class TestActivityCommon(TestMailCommon): cls._reset_mail_context(cls.test_record) -@tests.tagged('mail_activity') +@tests.tagged('mail_activity', 'post_install', '-at_install') class TestActivityRights(TestActivityCommon): @mute_logger('odoo.addons.mail.models.mail_mail') @@ -85,7 +85,7 @@ class TestActivityRights(TestActivityCommon): user_id=self.user_admin.id) -@tests.tagged('mail_activity') +@tests.tagged('mail_activity', 'post_install', '-at_install') class TestActivityFlow(TestActivityCommon): def test_activity_flow_employee(self): @@ -149,7 +149,7 @@ class TestActivityFlow(TestActivityCommon): self.assertEqual(activity.user_id, self.user_employee) -@tests.tagged('mail_activity') +@tests.tagged('mail_activity', 'post_install', '-at_install') class TestActivityMixin(TestActivityCommon): @mute_logger('odoo.addons.mail.models.mail_mail') diff --git a/addons/test_mail/tests/test_mail_channel.py b/addons/test_mail/tests/test_mail_channel.py index 2e3c7c2cb4b85d395beabc5be206b4cc1a6979f5..d10bcf3ee1038b848e5a8248274defcc72a05ce2 100644 --- a/addons/test_mail/tests/test_mail_channel.py +++ b/addons/test_mail/tests/test_mail_channel.py @@ -8,6 +8,7 @@ from odoo.exceptions import AccessError, except_orm, ValidationError, UserError from odoo.tools import mute_logger, formataddr +@tagged('post_install', '-at_install') class TestChannelAccessRights(TestMailCommon): @classmethod @@ -111,6 +112,7 @@ class TestChannelAccessRights(TestMailCommon): trigger_read = partner.with_user(self.user_portal).name +@tagged('post_install', '-at_install') class TestChannelFeatures(TestMailCommon): @classmethod @@ -208,7 +210,7 @@ class TestChannelFeatures(TestMailCommon): self.assertEqual(infos[0]['direct_partner'][0]['out_of_office_message'], 'Out') -@tagged('moderation') +@tagged('moderation', 'post_install', '-at_install') class TestChannelModeration(TestMailCommon): @classmethod diff --git a/addons/test_mail/tests/test_mail_followers.py b/addons/test_mail/tests/test_mail_followers.py index f3b1957d6c6f08768cb44ea71d893f9a677f80f9..dec8b8d9879ea0fe026db4bda9e714a0fe9396bc 100644 --- a/addons/test_mail/tests/test_mail_followers.py +++ b/addons/test_mail/tests/test_mail_followers.py @@ -4,9 +4,11 @@ from psycopg2 import IntegrityError from odoo.addons.test_mail.tests.common import TestMailCommon +from odoo.tests import tagged from odoo.tools.misc import mute_logger +@tagged('post_install', '-at_install') class BaseFollowersTest(TestMailCommon): @classmethod @@ -117,6 +119,7 @@ class BaseFollowersTest(TestMailCommon): }) +@tagged('post_install', '-at_install') class AdvancedFollowersTest(TestMailCommon): @classmethod def setUpClass(cls): diff --git a/addons/test_mail/tests/test_mail_gateway.py b/addons/test_mail/tests/test_mail_gateway.py index d9da245a1e087334f90b6439f5e6a090ef07fc55..a70777b4f08614083905e82d2371b3d3bb04e7bd 100644 --- a/addons/test_mail/tests/test_mail_gateway.py +++ b/addons/test_mail/tests/test_mail_gateway.py @@ -16,7 +16,7 @@ from odoo.tests import tagged from odoo.tools import email_split_and_format, formataddr, mute_logger -@tagged('mail_gateway') +@tagged('mail_gateway', 'post_install', '-at_install') class TestEmailParsing(TestMailCommon): def test_message_parse_body(self): @@ -70,7 +70,7 @@ class TestEmailParsing(TestMailCommon): self.env['mail.thread'].message_parse(self.from_string(test_mail_data.MAIL_XHTML)) -@tagged('mail_gateway') +@tagged('mail_gateway', 'post_install', '-at_install') class TestMailAlias(TestMailCommon): def test_alias_setup(self): @@ -78,7 +78,7 @@ class TestMailAlias(TestMailCommon): self.assertEqual(alias.alias_name, 'b4r+_-_r3wl-', 'Disallowed chars should be replaced by hyphens') -@tagged('mail_gateway') +@tagged('mail_gateway', 'post_install', '-at_install') class TestMailgateway(TestMailCommon): @classmethod @@ -737,6 +737,7 @@ class TestMailgateway(TestMailCommon): self.assertEqual(record._name, 'mail.test.gateway') +@tagged('post_install', '-at_install') class TestMailThreadCC(TestMailCommon): @classmethod diff --git a/addons/test_mail/tests/test_mail_mail.py b/addons/test_mail/tests/test_mail_mail.py index 7e6b0f98ba2445a9cfe18aa05052b134c23a6e38..a65a3c1b3fa92843175dfe4b6c949eed44bd9358 100644 --- a/addons/test_mail/tests/test_mail_mail.py +++ b/addons/test_mail/tests/test_mail_mail.py @@ -6,10 +6,11 @@ import psycopg2 from odoo import api from odoo.addons.base.models.ir_mail_server import MailDeliveryException from odoo.addons.test_mail.tests.common import TestMailCommon -from odoo.tests import common +from odoo.tests import common, tagged from odoo.tools import mute_logger +@tagged('post_install', '-at_install') class TestMailMail(TestMailCommon): @mute_logger('odoo.addons.mail.models.mail_mail') @@ -36,6 +37,7 @@ class TestMailMail(TestMailCommon): self.assertRaises(MailDeliveryException, lambda: mail.send(raise_exception=True)) +@tagged('post_install', '-at_install') class TestMailMailRace(common.TransactionCase): @mute_logger('odoo.addons.mail.models.mail_mail') diff --git a/addons/test_mail/tests/test_mail_message.py b/addons/test_mail/tests/test_mail_message.py index 2ff5c6f7d5fff7c7d77aa8351acd51b115559482..5ce9ffa046955db148ff64cc39cf17bfd737407d 100644 --- a/addons/test_mail/tests/test_mail_message.py +++ b/addons/test_mail/tests/test_mail_message.py @@ -6,10 +6,11 @@ import base64 from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.test_mail.tests.common import TestMailCommon from odoo.exceptions import AccessError, except_orm -from odoo.tools import mute_logger, formataddr from odoo.tests import tagged +from odoo.tools import mute_logger, formataddr +@tagged('post_install', '-at_install') class TestMessageValues(TestMailCommon): @classmethod diff --git a/addons/test_mail/tests/test_mail_template.py b/addons/test_mail/tests/test_mail_template.py index a845ffc0a79f0a60b7f70bb067f99d461b353a22..de323fed81241a57433add289f36a7032467ccc1 100644 --- a/addons/test_mail/tests/test_mail_template.py +++ b/addons/test_mail/tests/test_mail_template.py @@ -4,9 +4,11 @@ import base64 from odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients +from odoo.tests import tagged from odoo.tools import mute_logger +@tagged('post_install', '-at_install') class TestMailTemplate(TestMailCommon, TestRecipients): @classmethod diff --git a/addons/test_mail/tests/test_message_composer.py b/addons/test_mail/tests/test_message_composer.py index e94b5a533c378cbb3a9e468c066202a14fd997d5..1ff2ea4cab461a18df679821b63a32375028852f 100644 --- a/addons/test_mail/tests/test_message_composer.py +++ b/addons/test_mail/tests/test_message_composer.py @@ -7,9 +7,11 @@ from unittest.mock import patch from odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients from odoo.addons.test_mail.models.test_mail_models import MailTestSimple +from odoo.tests import tagged from odoo.tools import mute_logger +@tagged('post_install', '-at_install') class TestComposer(TestMailCommon, TestRecipients): @classmethod @@ -153,6 +155,7 @@ class TestComposer(TestMailCommon, TestRecipients): self.assertEqual(self.test_record.message_ids[0].author_id, portal_user.partner_id) +@tagged('post_install', '-at_install') class TestComposerWTpl(TestMailCommon, TestRecipients): @classmethod diff --git a/addons/test_mail/tests/test_message_management.py b/addons/test_mail/tests/test_message_management.py index b2c437ce2db676f21c72b9abae0a2ca3daf82c69..02e957985143b5f23dbc1bfcd572c70192f19ec1 100644 --- a/addons/test_mail/tests/test_message_management.py +++ b/addons/test_mail/tests/test_message_management.py @@ -7,7 +7,7 @@ from odoo.tests import tagged from odoo.tools import mute_logger -@tagged('mail_wizards') +@tagged('mail_wizards', 'post_install', '-at_install') class TestMailResend(TestMailCommon): @classmethod diff --git a/addons/test_mail/tests/test_message_post.py b/addons/test_mail/tests/test_message_post.py index 8e0a06320fb1c737e11a20a08ba311708f7db0d8..5b99717caa8707f9eae742c31978d73d5a960a7d 100644 --- a/addons/test_mail/tests/test_message_post.py +++ b/addons/test_mail/tests/test_message_post.py @@ -9,9 +9,11 @@ from odoo.addons.test_mail.data.test_mail_data import MAIL_TEMPLATE_PLAINTEXT from odoo.addons.test_mail.models.test_mail_models import MailTestSimple from odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients from odoo.exceptions import AccessError +from odoo.tests import tagged from odoo.tools import mute_logger, formataddr +@tagged('post_install', '-at_install') class TestMessagePost(TestMailCommon, TestRecipients): @classmethod diff --git a/addons/test_mail/tests/test_message_track.py b/addons/test_mail/tests/test_message_track.py index 61d64a70abe369ea190f4dc7fa97cef8f210c4ba..df260ee3b65ba8e2247094c21e476992bb9f40f8 100644 --- a/addons/test_mail/tests/test_message_track.py +++ b/addons/test_mail/tests/test_message_track.py @@ -4,8 +4,10 @@ from unittest.mock import patch from odoo.addons.test_mail.tests.common import TestMailCommon +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestTracking(TestMailCommon): def setUp(self): diff --git a/addons/test_mail/tests/test_odoobot.py b/addons/test_mail/tests/test_odoobot.py index 740a0444974244526041f1ba686b292ef4c9982b..67b0e499ff04695bbf735ca3b0bbcc5285318029 100644 --- a/addons/test_mail/tests/test_odoobot.py +++ b/addons/test_mail/tests/test_odoobot.py @@ -8,7 +8,7 @@ from odoo.tests import tagged from odoo.tools import mute_logger -@tagged("odoobot") +@tagged("odoobot", 'post_install', '-at_install') class TestOdoobot(TestMailCommon, TestRecipients): @classmethod diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 6cdc637ccf3da1edcaf3849557df8aed61260c95..9e04c4b02c80fc562c589a7c2f47ebb55cd47d95 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -3,12 +3,12 @@ import base64 from odoo.addons.base.tests.common import TransactionCaseWithUserDemo -from odoo.tests.common import TransactionCase, users, warmup +from odoo.tests.common import users, warmup from odoo.tests import tagged from odoo.tools import mute_logger, formataddr -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class BaseMailPerformance(TransactionCaseWithUserDemo): def setUp(self): @@ -32,7 +32,7 @@ class BaseMailPerformance(TransactionCaseWithUserDemo): self.patch(self.env.registry, 'ready', True) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestMailPerformance(BaseMailPerformance): def setUp(self): @@ -167,7 +167,7 @@ class TestMailPerformance(BaseMailPerformance): }) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestMailAPIPerformance(BaseMailPerformance): def setUp(self): @@ -226,11 +226,11 @@ class TestMailAPIPerformance(BaseMailPerformance): 'res_id': record.id, 'activity_type_id': self.env.ref('mail.mail_activity_data_todo').id, }) - #read activity_type to normalize cache between enterprise and community - #voip module read activity_type during create leading to one less query in enterprise on action_feedback - category = activity.activity_type_id.category + # read activity_type to normalize cache between enterprise and community + # voip module read activity_type during create leading to one less query in enterprise on action_feedback + activity.activity_type_id.category - with self.assertQueryCount(__system__=19, emp=22): + with self.assertQueryCount(__system__=19 + 1, emp=22 + 1): activity.action_feedback(feedback='Zizisse Done !') @users('__system__', 'emp') @@ -241,13 +241,13 @@ class TestMailAPIPerformance(BaseMailPerformance): with self.assertQueryCount(__system__=8, emp=8): activity = record.action_start('Test Start') - #read activity_type to normalize cache between enterprise and community - #voip module read activity_type during create leading to one less query in enterprise on action_close - category = activity.activity_type_id.category + # read activity_type to normalize cache between enterprise and community + # voip module read activity_type during create leading to one less query in enterprise on action_close + activity.activity_type_id.category record.write({'name': 'Dupe write'}) - with self.assertQueryCount(__system__=20, emp=22): + with self.assertQueryCount(__system__=20 + 1, emp=22 + 1): record.action_close('Dupe feedback') self.assertEqual(record.activity_ids, self.env['mail.activity']) @@ -268,7 +268,7 @@ class TestMailAPIPerformance(BaseMailPerformance): 'partner_ids': [(4, customer_id)], }) - with self.assertQueryCount(__system__=38, emp=44): + with self.assertQueryCount(__system__=38 + 1, emp=44 + 1): composer.send_mail() @users('__system__', 'emp') @@ -278,7 +278,7 @@ class TestMailAPIPerformance(BaseMailPerformance): test_record = self.env['mail.test.full'].browse(self.test_record_full.id) test_template = self.env['mail.template'].browse(self.test_template_full.id) # TODO XDO/TDE FIXME non deterministic between 25 and 28 queries - with self.assertQueryCount(__system__=28, emp=28): + with self.assertQueryCount(__system__=21 + 12, emp=21 + 12): composer = self.env['mail.compose.message'].with_context({ 'default_composition_mode': 'comment', 'default_model': test_record._name, @@ -287,7 +287,7 @@ class TestMailAPIPerformance(BaseMailPerformance): }).create({}) composer.onchange_template_id_wrapper() - with self.assertQueryCount(__system__=46, emp=51): + with self.assertQueryCount(__system__=46 + 1, emp=51 + 1): composer.send_mail() # remove created partner to ensure tests are the same each run @@ -299,7 +299,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_assignation_email(self): self.user_test.write({'notification_type': 'email'}) record = self.env['mail.test.track'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=40, emp=41): + with self.assertQueryCount(__system__=40 + 2, emp=41 + 2): record.write({ 'user_id': self.user_test.id, }) @@ -308,7 +308,7 @@ class TestMailAPIPerformance(BaseMailPerformance): @warmup def test_message_assignation_inbox(self): record = self.env['mail.test.track'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=27, emp=29): + with self.assertQueryCount(__system__=27 + 1, emp=29 + 1): record.write({ 'user_id': self.user_test.id, }) @@ -352,7 +352,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_post_one_email_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=33, emp=34): + with self.assertQueryCount(__system__=33 + 1, emp=34 + 1): record.message_post( body='<p>Test Post Performances with an email ping</p>', partner_ids=self.customer.ids, @@ -397,7 +397,7 @@ class TestMailAPIPerformance(BaseMailPerformance): record.message_subscribe(partner_ids=self.user_test.partner_id.ids, subtype_ids=subtype_ids) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestMailComplexPerformance(BaseMailPerformance): def setUp(self): @@ -472,7 +472,7 @@ class TestMailComplexPerformance(BaseMailPerformance): self.umbrella.message_subscribe(self.user_portal.partner_id.ids) record = self.umbrella.with_user(self.env.user) - with self.assertQueryCount(__system__=73, emp=74): + with self.assertQueryCount(__system__=73 + 1, emp=74 + 1): record.message_post( body='<p>Test Post Performances</p>', message_type='comment', @@ -489,7 +489,7 @@ class TestMailComplexPerformance(BaseMailPerformance): record = self.umbrella.with_user(self.env.user) template_id = self.env.ref('test_mail.mail_test_tpl').id - with self.assertQueryCount(__system__=84, emp=85): + with self.assertQueryCount(__system__=84 + 3, emp=85 + 3): record.message_post_with_template(template_id, message_type='comment', composition_mode='comment') self.assertEqual(record.message_ids[0].body, '<p>Adding stuff on %s</p>' % record.name) @@ -560,7 +560,7 @@ class TestMailComplexPerformance(BaseMailPerformance): }) rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id) - with self.assertQueryCount(__system__=39, emp=40): + with self.assertQueryCount(__system__=39 + 2, emp=40 + 2): rec.write({'user_id': self.user_portal.id}) self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) # write tracking message @@ -580,7 +580,7 @@ class TestMailComplexPerformance(BaseMailPerformance): customer_id = self.customer.id user_id = self.user_portal.id - with self.assertQueryCount(__system__=123, emp=124): + with self.assertQueryCount(__system__=123 + 3, emp=124 + 3): rec = self.env['mail.test.full'].create({ 'name': 'Test', 'umbrella_id': umbrella_id, @@ -609,11 +609,11 @@ class TestMailComplexPerformance(BaseMailPerformance): rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) self.assertEqual(len(rec1.message_ids), 1) - with self.assertQueryCount(__system__=87, emp=88): + with self.assertQueryCount(__system__=87 + 1, emp=88 + 1): rec.write({ 'name': 'Test2', 'umbrella_id': self.umbrella.id, - }) + }) self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) # write tracking message @@ -646,13 +646,12 @@ class TestMailComplexPerformance(BaseMailPerformance): rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) - with self.assertQueryCount(__system__=95, emp=96): + with self.assertQueryCount(__system__=95 + 1, emp=96 + 1): rec.write({ 'name': 'Test2', 'umbrella_id': umbrella_id, 'customer_id': customer_id, - }) - + }) self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) # write tracking message @@ -680,7 +679,7 @@ class TestMailComplexPerformance(BaseMailPerformance): rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) - with self.assertQueryCount(__system__=34, emp=35): + with self.assertQueryCount(__system__=34 + 1, emp=35 + 1): rec.write({ 'name': 'Test2', 'customer_id': customer_id, @@ -699,7 +698,7 @@ class TestMailComplexPerformance(BaseMailPerformance): self.assertEqual(len(rec1.message_ids), 3) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestMailHeavyPerformancePost(BaseMailPerformance): def setUp(self): @@ -817,7 +816,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=92): + with self.assertQueryCount(emp=92 + 17): self.cr.sql_log = self.warm and self.cr.sql_log_count record.with_context({}).message_post( body='<p>Test body <img src="cid:cid1"> <img src="cid:cid2"></p>', @@ -840,7 +839,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance): # self.assertEqual(record.message_ids[0].notified_partner_ids, []) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestTrackingPerformance(BaseMailPerformance): @users('__system__', 'demo') diff --git a/addons/test_mail/tests/test_update_notification.py b/addons/test_mail/tests/test_update_notification.py index 7621e4056a11d81bc7ebb247454811a77c74a713..22c140cefe2cd5de48a197db37e09f4527de6632 100644 --- a/addons/test_mail/tests/test_update_notification.py +++ b/addons/test_mail/tests/test_update_notification.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- + +from odoo.tests import tagged from odoo.tests.common import TransactionCase +@tagged('post_install', '-at_install') class TestUpdateNotification(TransactionCase): def test_user_count(self): ping_msg = self.env['publisher_warranty.contract'].with_context(active_test=False)._get_message() diff --git a/addons/test_mail_full/tests/test_mass_sms.py b/addons/test_mail_full/tests/test_mass_sms.py index 42d58bde0c7f15306d0972db101148bd70eefec2..054f8d5cbb3cf8f97ab023bd147b2b64303d2106 100644 --- a/addons/test_mail_full/tests/test_mass_sms.py +++ b/addons/test_mail_full/tests/test_mass_sms.py @@ -7,7 +7,7 @@ from odoo.addons.test_mail_full.tests import common as test_mail_full_common from odoo.tests import tagged -@tagged('mass_mailing') +@tagged('mass_mailing', 'post_install', '-at_install') class TestMassSMS(test_mail_full_common.TestSMSCommon): @classmethod diff --git a/addons/test_mail_full/tests/test_phone_blacklist.py b/addons/test_mail_full/tests/test_phone_blacklist.py index d67930d3c76f35ed8fe506082f6faad2f604a851..cf6e20789c8b5f00b621cab9c7d9b2cbf85f61f4 100644 --- a/addons/test_mail_full/tests/test_phone_blacklist.py +++ b/addons/test_mail_full/tests/test_phone_blacklist.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestPhoneBlacklist(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): """ TODO """ diff --git a/addons/test_mail_full/tests/test_sms_composer.py b/addons/test_mail_full/tests/test_sms_composer.py index ba9e437e6a07175eb73351a086acfeb8e1923244..8f3d854d70691d2b27dff6525856a3ed70e2f7e1 100644 --- a/addons/test_mail_full/tests/test_sms_composer.py +++ b/addons/test_mail_full/tests/test_sms_composer.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestSMSComposerComment(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): """ TODO LIST @@ -132,6 +134,7 @@ class TestSMSComposerComment(test_mail_full_common.TestSMSCommon, test_mail_full self.assertSMSSent(self.random_numbers_san, self._test_body) +@tagged('post_install', '-at_install') class TestSMSComposerBatch(test_mail_full_common.TestSMSCommon): @classmethod def setUpClass(cls): @@ -208,6 +211,7 @@ class TestSMSComposerBatch(test_mail_full_common.TestSMSCommon): self.assertSMSNotification([{'partner': r.customer_id} for r in self.records], 'Zizisse an SMS.', messages) +@tagged('post_install', '-at_install') class TestSMSComposerMass(test_mail_full_common.TestSMSCommon): @classmethod diff --git a/addons/test_mail_full/tests/test_sms_management.py b/addons/test_mail_full/tests/test_sms_management.py index 375ed454f2522c548c4643ebfd90bf2da6b64642..fce9a870c6d5703e8bcf00a3248ad7cc950ebad1 100644 --- a/addons/test_mail_full/tests/test_sms_management.py +++ b/addons/test_mail_full/tests/test_sms_management.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestSMSWizards(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): @classmethod diff --git a/addons/test_mail_full/tests/test_sms_performance.py b/addons/test_mail_full/tests/test_sms_performance.py index 2128c9fe42f16078e098dee3d1c7f4efe4d10940..afa1de02a142ca4bd7b8f9a913c26301b4d4db8c 100644 --- a/addons/test_mail_full/tests/test_sms_performance.py +++ b/addons/test_mail_full/tests/test_sms_performance.py @@ -8,7 +8,7 @@ from odoo.tests import tagged from odoo.tools import mute_logger -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestSMSPerformance(BaseMailPerformance, sms_common.MockSMS): def setUp(self): @@ -89,7 +89,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.MockSMS): self.assertSMSNotification([{'partner': self.customer}], 'Performance Test', messages) -@tagged('mail_performance') +@tagged('mail_performance', 'post_install', '-at_install') class TestSMSMassPerformance(BaseMailPerformance, sms_common.MockSMS): def setUp(self): diff --git a/addons/test_mail_full/tests/test_sms_post.py b/addons/test_mail_full/tests/test_sms_post.py index b28ac3a0a37f5f2a8c11e0c05f5c2c200fecb233..3bf73d1c48edd56e0537ffd795bb16bc3541db22 100644 --- a/addons/test_mail_full/tests/test_sms_post.py +++ b/addons/test_mail_full/tests/test_sms_post.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestSMSPost(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): """ TODO @@ -219,6 +221,7 @@ class TestSMSPost(test_mail_full_common.TestSMSCommon, test_mail_full_common.Tes self.assertSMSNotification([{'partner': self.partner_1, 'number': self.test_numbers_san[1]}], 'Dear %s this is an SMS.' % self.test_record.display_name, messages) +@tagged('post_install', '-at_install') class TestSMSPostException(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): @classmethod @@ -339,6 +342,7 @@ class TestSMSPostException(test_mail_full_common.TestSMSCommon, test_mail_full_c ], self._test_body, messages) +@tagged('post_install', '-at_install') class TestSMSApi(test_mail_full_common.TestSMSCommon): @classmethod diff --git a/addons/test_mail_full/tests/test_sms_server_actions.py b/addons/test_mail_full/tests/test_sms_server_actions.py index 6cc9995caa3e618de6b80a54b7f7174da1ac83fb..121abc2f52961ddf12702c6fbcab18184839e110 100644 --- a/addons/test_mail_full/tests/test_sms_server_actions.py +++ b/addons/test_mail_full/tests/test_sms_server_actions.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestServerAction(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): @classmethod diff --git a/addons/test_mail_full/tests/test_sms_sms.py b/addons/test_mail_full/tests/test_sms_sms.py index de7e37ac641f6d20aaf357894fc668dd0804db8e..dc5b73f6627465a80b882af1961477deaea488ef 100644 --- a/addons/test_mail_full/tests/test_sms_sms.py +++ b/addons/test_mail_full/tests/test_sms_sms.py @@ -9,7 +9,7 @@ from unittest.mock import DEFAULT from odoo import exceptions from odoo.addons.sms.models.sms_sms import SmsSms as SmsSms from odoo.addons.test_mail_full.tests import common as test_mail_full_common -from odoo.tests import common +from odoo.tests import common, tagged class LinkTrackerMock(common.BaseCase): @@ -47,6 +47,7 @@ class LinkTrackerMock(common.BaseCase): self.assertEqual(redirect_params, url_params) +@tagged('post_install', '-at_install') class TestSMSPost(test_mail_full_common.TestSMSCommon, LinkTrackerMock): @classmethod diff --git a/addons/test_mail_full/tests/test_sms_template.py b/addons/test_mail_full/tests/test_sms_template.py index fb8c1353fb158a2536cf41604443522c48b35f2b..0ddbb41c60d8a94283bfbad36c008560cc52509c 100644 --- a/addons/test_mail_full/tests/test_sms_template.py +++ b/addons/test_mail_full/tests/test_sms_template.py @@ -2,8 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests import common as test_mail_full_common +from odoo.tests import tagged +@tagged('post_install', '-at_install') class TestSmsTemplate(test_mail_full_common.TestSMSCommon, test_mail_full_common.TestRecipients): @classmethod