Skip to content

Commit

Permalink
[9.0][FIX] database_cleanup: Isolate build (OCA#719)
Browse files Browse the repository at this point in the history
* [FIX] database_cleanup: Isolate build
* Isolate `database_cleanup` into its own build in Travis file to fix OCA#689

* [FIX] database_cleanup: Remove KeyError assertion
* Remove KeyError assertion in tests due to PR in comment being merged
  • Loading branch information
lasley authored and mart-e committed May 10, 2019
1 parent f3ffb7d commit 04c0652
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions database_cleanup/tests/test_database_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,11 @@ def test_database_cleanup(self):
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({
Expand Down

0 comments on commit 04c0652

Please sign in to comment.