Uh oh!
There was an error while loading. Please reload this page.
[18.0][FIX] test_queue_job: also add an _unregister_hook function that reverts patches - #875
Conversation
…rts patches Otherwise monkey-patches could be added twice when instantiating new test classes.
OCA-git-bot
commented
Jan 8, 2026
Hi @sbidoul, |
sbidoul
commented
Jan 8, 2026
Is that due to a recent change or has this been there since like forever? |
thomaspaulb
commented
Jan 10, 2026
Probably since 2021? https://github.com/OCA/queue/pull/275/files I only ran into it because I backported your change from 18.0 that adds an extra test class, thus Odoo applies the hook twice; and in 16.0 there is still a test that checks if the warning that's emitted by the patched methods is emitted only once, and it was emitted twice. But in 18.0 it wouldn't be apparent because that test was removed. |
sbidoul
commented
Jan 21, 2026
/ocabot merge patch Thanks! |
OCA-git-bot
commented
Jan 21, 2026
Hey, thanks for contributing! Proceeding to merge this for you. |
Uh oh!
There was an error while loading. Please reload this page.
OCA-git-bot
commented
Jan 21, 2026
Congratulations, your PR was merged at f209d61. Thanks a lot for contributing to OCA. ❤️ |
Otherwise monkey-patches could be added twice when instantiating new test classes.