[FIX] test_mail: test that needs to commit the cursor

As the test explicitly commits the cursor (this is necessary to release
database locks), the teardown phase needs a valid savepoint.
This commit is contained in:
Raphael Collet
2020-11-24 13:23:32 +00:00
parent c1279cd52a
commit cf0bf4737f
+4
View File
@@ -90,3 +90,7 @@ class TestMailMailRace(common.TransactionCase):
mail.unlink()
self.partner.unlink()
self.env.cr.commit()
# because we committed the cursor, the savepoint of the test method is
# gone, and this would break TransactionCase cleanups
self.cr.execute('SAVEPOINT test_%d' % self._savepoint_id)