Skip to content

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

Open
yankinmax wants to merge 1 commit into
OCA:18.0from
camptocamp:fix-endpoint
Open

[FIX] endpoint: use self.patch for _endpoint_route_prefix in test_routing#148
yankinmax wants to merge 1 commit into
OCA:18.0from
camptocamp:fix-endpoint

Conversation

@yankinmax

Copy link
Copy Markdown

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!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants