Skip to content

[18.0][FIX] test_queue_job: also add an _unregister_hook function that reverts patches - #875

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
Therp:18.0-test_queue_job-unregister_hook
Jan 21, 2026
Merged

[18.0][FIX] test_queue_job: also add an _unregister_hook function that reverts patches#875
OCA-git-bot merged 1 commit into
OCA:18.0from
Therp:18.0-test_queue_job-unregister_hook

Conversation

@thomaspaulb

Copy link
Copy Markdown
Contributor

Otherwise monkey-patches could be added twice when instantiating new test classes.

…rts patches
Otherwise monkey-patches could be added twice when instantiating new test classes.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sbidoul,
some modules you are maintaining are being modified, check this out!

@thomaspaulbthomaspaulb mentioned this pull request Jan 8, 2026
9 tasks
@sbidoul

Copy link
Copy Markdown
Member

Is that due to a recent change or has this been there since like forever?

@sbidoulsbidoul added this to the 18.0 milestone Jan 8, 2026
@sbidoulsbidoul changed the title [FIX] test_queue_job: also add an _unregister_hook function that reverts patches[18.0][FIX] test_queue_job: also add an _unregister_hook function that reverts patchesJan 8, 2026
@thomaspaulb

Copy link
Copy Markdown
ContributorAuthor

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

Copy link
Copy Markdown
Member

/ocabot merge patch

Thanks!

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-875-by-sbidoul-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit ac897ea into OCA:18.0Jan 21, 2026
5 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at f209d61. Thanks a lot for contributing to OCA. ❤️

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thomaspaulb@OCA-git-bot@sbidoul