diff --git a/webservice/tests/common.py b/webservice/tests/common.py index 3bbc4633..3608af3a 100644 --- a/webservice/tests/common.py +++ b/webservice/tests/common.py @@ -39,9 +39,10 @@ def _request_handler(cls, s: Session, r: PreparedRequest, /, **kw): if r.url.startswith("https://localhost.demo.odoo/") or r.url.startswith( "https://custom.url" ): - r = Response() - r.status_code = 200 - r._content = b"{}" + response = Response() + response.status_code = 200 + response.request = r + response._content = b"{}" return r return super()._request_handler(s, r, **kw)