Holger Brunn
9 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
1 changed files with
8 additions and
0 deletions
-
database_cleanup/tests/test_database_cleanup.py
|
|
@ -64,3 +64,11 @@ class TestDatabaseCleanup(TransactionCase): |
|
|
|
self.assertFalse(self.env['ir.module.module'].search([ |
|
|
|
('name', '=', 'database_cleanup_test'), |
|
|
|
])) |
|
|
|
|
|
|
|
# create an orphaned table |
|
|
|
self.env.cr.execute('create table database_cleanup_test (test int)') |
|
|
|
purge_tables = self.env['cleanup.purge.wizard.table'].create({}) |
|
|
|
purge_tables.purge_all() |
|
|
|
with self.assertRaises(ProgrammingError): |
|
|
|
with self.registry.cursor() as cr: |
|
|
|
self.env.cr.execute('select * from database_cleanup_test') |