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

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