Skip to content

[FIX] endpoint: use self.patch for _endpoint_route_prefix in test_routing - #148

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:fix-endpoint
Jul 29, 2026
Merged

[FIX] endpoint: use self.patch for _endpoint_route_prefix in test_routing#148
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:fix-endpoint

Conversation

@yankinmax

Copy link
Copy Markdown
Contributor

Manually reassigning type(endpoint)._endpoint_route_prefix leaves a residual class attribute directly on endpoint.endpoint (the field is only defined on the EndpointRouteHandler mixin), which Odoo's test harness now flags as an unexpected class mutation after the test. Use self.patch() so the attribute is properly restored (deleted) on cleanup.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simahawk this is probably what fixes #132 too

@simahawk

Copy link
Copy Markdown
Contributor

/ocabot merge patch

@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-148-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit d48ff81 into OCA:18.0 Jul 29, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

Sign up for free to 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.

4 participants