Browse Source

[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/728/head
Dave Lasley 8 years ago
committed by Pedro M. Baeza
parent
commit
026640e4fb
  1. 6
      .travis.yml
  2. 4
      database_cleanup/tests/test_database_cleanup.py

6
.travis.yml

@ -21,8 +21,10 @@ env:
matrix: matrix:
- LINT_CHECK="1" - LINT_CHECK="1"
- TRANSIFEX="1" - TRANSIFEX="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="database_cleanup"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="database_cleanup"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="database_cleanup"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="database_cleanup"
virtualenv: virtualenv:
system_site_packages: true system_site_packages: true

4
database_cleanup/tests/test_database_cleanup.py

@ -59,10 +59,6 @@ class TestDatabaseCleanup(TransactionCase):
self.registry._pure_function_fields.pop( self.registry._pure_function_fields.pop(
'x_database.cleanup.test.model') 'x_database.cleanup.test.model')
purge_models = self.env['cleanup.purge.wizard.model'].create({}) 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() purge_models.purge_all()
# must be removed by the wizard # must be removed by the wizard
self.assertFalse(self.env['ir.model'].search([ self.assertFalse(self.env['ir.model'].search([

Loading…
Cancel
Save