You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
630 B

# coding: utf-8
# © 2016 David BEAL @ Akretion <david.beal@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
class TestSecureUninstall(TransactionCase):
def test_secure_uninstall_without_key(self):
vals = {'uninstall_password': 'toto'}
bmu = self.env['base.module.upgrade'].create(vals)
try:
bmu.upgrade_module()
except Exception as e:
messages = ('Missing configuration key',
'Password Error\n----------')
self.assertIn(e.message[:25], messages)