From 62885e310d7c10dce235f5d5ad1c1cd0e849deb6 Mon Sep 17 00:00:00 2001 From: Miika Nissi Date: Thu, 28 Dec 2023 17:26:27 -0500 Subject: [PATCH] [FIX] database_cleanup: TransactionCase already does rollback No need to rollback here as TransactionCase does a safe rollback. --- database_cleanup/tests/common.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/database_cleanup/tests/common.py b/database_cleanup/tests/common.py index 44347550d..1cba6102b 100644 --- a/database_cleanup/tests/common.py +++ b/database_cleanup/tests/common.py @@ -12,10 +12,3 @@ class Common(TransactionCase): # we also need the original registry for further tests, so save a # reference to it self.original_registry = Registry.registries[self.env.cr.dbname] - - def tearDown(self): - super(Common, self).tearDown() - # Force rollback to avoid unstable test database - self.env.cr.rollback() - # reset afterwards - Registry.registries[self.env.cr.dbname] = self.original_registry