Skip to content
Snippets Groups Projects
Commit f41c2ba5 authored by Renaud Thiry's avatar Renaud Thiry
Browse files

[IMP] base: Clear precommits on test cleanup


Precommit hooks would stock data until a call to ``cr.flush`` was made.
Notably, this happens when the ``assertRaises`` method is called.
Functions were applied on records already cleared from the cache.

This change adds a cleanup call for `TransactionCase` as it keeps
the same cursor for all tests. Cursor precommits can now
be safely executed inside tests.

Task-2834304

closes odoo/odoo#118011

X-original-commit: 4d2fdbab
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: default avatarThiry Renaud (reth) <reth@odoo.com>
parent 0472569f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment