diff --git a/fastapi/tests/common.py b/fastapi/tests/common.py index f9c05b67..96658838 100644 --- a/fastapi/tests/common.py +++ b/fastapi/tests/common.py @@ -127,6 +127,7 @@ def _create_test_client( or self.default_fastapi_authenticated_partner or self.env["res.partner"] ) + partner = partner.with_env(env) if partner and authenticated_partner_impl in dependencies: raise ValueError( "You cannot provide an override for the authenticated_partner_impl "