Skip to content

Commit

Permalink
Merge PR #373 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sebastienbeau
  • Loading branch information
OCA-git-bot committed Sep 25, 2023
2 parents 84eaea2 + aba642f commit a8c4314
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fastapi/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ def _create_test_client(
dependencies.update(dependency_overrides)
if user:
env = env(user=user)
partner = partner or self.default_fastapi_authenticated_partner
if partner:
dependencies[authenticated_partner_impl] = partial(lambda a: a, partner)
partner = (
partner
or self.default_fastapi_authenticated_partner
or self.env["res.partner"]
)
dependencies[authenticated_partner_impl] = partial(lambda a: a, partner)
app = app or self.default_fastapi_app or FastAPI()
router = router or self.default_fastapi_router
if router:
Expand Down

0 comments on commit a8c4314

Please sign in to comment.