def _fake_post_response(
        self,
        status_code: int,
        json: serial_utils.JSON,
        request: requests.Request,
    ) -> requests.Response:
        """Fake requests.Response object for a fake post request."""

        res = requests.Response()

        res.status_code = status_code

        res._content = mod_json.dumps(json).encode()
        res._content_consumed = True
        res.raw = io.BytesIO(res._content)  # might not be needed

        res.headers = request_structures.CaseInsensitiveDict({
            "content-type": "application/json"
        })

        res.request = request.prepare()

        return res
Fake requests.Response object for a fake post request.
src/feedback/trulens/feedback/dummy/endpoint.py