Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] fastapi: partner env for tests #479

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

oerp-odoo
Copy link

partner record leaks default env and even if you specify default_fastapi_running_user to be custom user, when running tests, running env will still have default (superuser), which makes testing outcomes very different than you might expect.

Setting partner to use env with specified user, makes sure it won't leak from there.

`partner` record leaks default env and even if you specify
`default_fastapi_running_user` to be custom user, when running tests,
running env will still have default (superuser), which makes testing
outcomes very different than you might expect.

Setting `partner` to use env with specified user, makes sure it won't
leak from there.
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon added this to the 17.0 milestone Dec 11, 2024
@lmignon lmignon changed the title [FIX] fastapi: partner env for tests [17.0][FIX] fastapi: partner env for tests Dec 11, 2024
Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, it makes sense.

@oerp-odoo
Copy link
Author

@lmignon when you plan to merge it?

@lmignon
Copy link
Contributor

lmignon commented Dec 13, 2024

@lmignon when you plan to merge it?

I would like to collect more feedback from others users.

ping @paradoxxxzero @qgroulard @AnizR

@paradoxxxzero
Copy link
Contributor

Seems fair and would explain some false negative I got 👍

@lmignon
Copy link
Contributor

lmignon commented Dec 13, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-479-by-lmignon-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c37a488 into OCA:17.0 Dec 13, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@oerp-odoo oerp-odoo deleted the fix-fastapi-test-partner-env branch December 13, 2024 10:29
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