utm/tests/test_utm_consistency.py
Данил Воробьев 3010bdfaae initial commit
2024-05-03 12:31:11 +00:00

19 lines
661 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.utm.tests.common import TestUTMCommon
from odoo.exceptions import UserError
from odoo.tests.common import tagged, users
@tagged('post_install', '-at_install', 'utm_consistency')
class TestUTMSecurity(TestUTMCommon):
@users('__system__')
def test_utm_consistency(self):
""" You are not supposed to delete the 'utm_medium_email' record as it is hardcoded in
some functional flows, notably in HR and Mass Mailing. """
with self.assertRaises(UserError):
self.env.ref('utm.utm_medium_email').unlink()