docstr: Test calling request_object on an instance of ASGIProxyRequest.
  
  When the request_object is called, it returns a StreamingHTTPRequest object
  with the correct pickled_asgi_scope and http_proxy_handle.
docstr_tok: ["Test","calling","request_object","on","an","instance","of","ASGIProxyRequest",".","When","the","request_object","is","called",",","it","returns","a","StreamingHTTPRequest","object","with","the","correct","pickled_asgi_scope","and","http_proxy_handle","."]
code: def test_request_object(self):
      """Test calling request_object on an instance of ASGIProxyRequest.
  
      When the request_object is called, it returns a StreamingHTTPRequest object
      with the correct pickled_asgi_scope and http_proxy_handle.
      """
      proxy_handle = MagicMock()
      headers = [(b"fake-header-key", b"fake-header-value")]
      scope = {"headers": headers}
      proxy_request = self.create_asgi_proxy_request(scope=scope)
      request_object = proxy_request.request_object(
          proxy_handle=proxy_handle
      )
  
      assert isinstance(request_object, StreamingHTTPRequest)
      assert pickle.loads(request_object.pickled_asgi_scope) == scope
      assert request_object.http_proxy_handle == proxy_handle
  
imports: import pickle
  from unittest.mock import MagicMock
  import pytest
  from ray.serve._private.common import StreamingHTTPRequest, gRPCRequest
  from ray.serve._private.proxy_request_response import ASGIProxyRequest, ProxyRequest, gRPCProxyRequest
  from ray.serve._private.test_utils import FakeGrpcContext
  from ray.serve.generated import serve_pb2
label_desc: Use image node_id 8 for calling the TestASGIProxyRequest obj's underlying member method code with example usage: obj.test_request_object() without return types