summaryrefslogtreecommitdiff
path: root/addons/sms
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2021-04-07 09:17:19 +0000
committerThibault Delavallée <tde@odoo.com>2021-04-08 15:06:12 +0000
commitc75e8619663efc4d97ab13fb35f815104239dd36 (patch)
tree06c85dae716a3947aaa6e50a648ef81237f290f7 /addons/sms
parent51700491ae3b26d513ddfeda378a60592fca6eab (diff)
[IMP] event, mail, mass_mailing, sms, test_mail: clean some mail tests tools helpers and parameters
In this commit we backport some of 14.1+ improvements done in mail tools in order to keep a coherent definition through sub versions. We also improve docstring and add some explanations on available toold and asserts. Task ID-2500615 COM PR odoo/odoo#68874
Diffstat (limited to 'addons/sms')
-rw-r--r--addons/sms/tests/test_sms_template.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/sms/tests/test_sms_template.py b/addons/sms/tests/test_sms_template.py
index 8e3bbfae3a6..9483ecaf7bc 100644
--- a/addons/sms/tests/test_sms_template.py
+++ b/addons/sms/tests/test_sms_template.py
@@ -3,8 +3,9 @@
from odoo.tests.common import SavepointCase, users
from odoo.addons.mail.tests.common import mail_new_test_user
-from odoo.tests import tagged
from odoo.exceptions import AccessError
+from odoo.tests import tagged
+from odoo.tools import mute_logger
@tagged('post_install')
@@ -26,7 +27,8 @@ class TestSmsTemplateAccessRights(SavepointCase):
cls.sms_templates = cls.env['sms.template'].create(vals)
@users('user_employee')
- def test_access_rights_user_sms_template(self):
+ @mute_logger('odoo.models.unlink')
+ def test_access_rights_user(self):
# Check if a member of group_user can only read on sms.template
for sms_template in self.env['sms.template'].browse(self.sms_templates.ids):
self.assertTrue(bool(sms_template.name))
@@ -42,7 +44,8 @@ class TestSmsTemplateAccessRights(SavepointCase):
sms_template.unlink()
@users('user_system')
- def test_access_rights_manager_sms_template(self):
+ @mute_logger('odoo.models.unlink', 'odoo.addons.base.models.ir_model')
+ def test_access_rights_system(self):
admin = self.env.ref('base.user_admin')
for sms_template in self.env['sms.template'].browse(self.sms_templates.ids):
self.assertTrue(bool(sms_template.name))