From e4028b12af689fecfca8e3828af9b1644e9cdba1 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 23 Sep 2015 18:50:33 +0200 Subject: [PATCH] Revert "[FIX] core: close cursors open during tests" Not necessary anymore thanks to commit 731b9f60ea4dcf9ef414c5538b8ac4111b3ea02c. The test cursors were leaked by the _check_accounting_configured() function used to manually skip some tests. After 731b9f6 the tests are skipped cleanly without leaking cursors, so this became redundant with the reset() function already present in the TransactionCase cleanups. This reverts commit 57b14988b0b8e426a44d81f2c764f3a59beab343. --- openerp/tests/common.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/openerp/tests/common.py b/openerp/tests/common.py index dd09b93a48e..94f05365913 100644 --- a/openerp/tests/common.py +++ b/openerp/tests/common.py @@ -88,14 +88,7 @@ class BaseCase(unittest2.TestCase): """ def cursor(self): - cr = self.registry.cursor() - - @self.addCleanup - def close_cursor(): - if not cr.closed: - cr.close() - - return cr + return self.registry.cursor() def ref(self, xid): """ Returns database ID for the provided :term:`external identifier`,