[9.0][FIX] database_cleanup: Isolate build (#719)

* [FIX] database_cleanup: Isolate build
* Isolate `database_cleanup` into its own build in Travis file to fix #689

* [FIX] database_cleanup: Remove KeyError assertion
* Remove KeyError assertion in tests due to PR in comment being merged
pull/2684/head
Dave Lasley 2017-02-07 15:53:23 -08:00 committed by Miika Nissi
parent 808cdaa968
commit 5dd1e9b409
No known key found for this signature in database
GPG Key ID: B20DC9FCFAF92E7F
1 changed files with 5 additions and 9 deletions

View File

@ -59,15 +59,11 @@ class TestDatabaseCleanup(TransactionCase):
self.registry._pure_function_fields.pop(
'x_database.cleanup.test.model')
purge_models = self.env['cleanup.purge.wizard.model'].create({})
with self.assertRaisesRegexp(KeyError,
'x_database.cleanup.test.model'):
# TODO: Remove with-assert of KeyError after fix:
# https://github.com/odoo/odoo/pull/13978/files#r88654967
purge_models.purge_all()
# must be removed by the wizard
self.assertFalse(self.env['ir.model'].search([
('model', '=', 'x_database.cleanup.test.model'),
]))
purge_models.purge_all()
# must be removed by the wizard
self.assertFalse(self.env['ir.model'].search([
('model', '=', 'x_database.cleanup.test.model'),
]))
# create a nonexistent module
self.module = self.env['ir.module.module'].create({