docstr: Test calling request_type on an instance of ASGIProxyRequest.
  
  When the request_type is not passed into the scope, it returns empty string.
  When the request_type is passed into the scope, it returns the correct value.
docstr_tok: ["Test","calling","request_type","on","an","instance","of","ASGIProxyRequest",".","When","the","request_type","is","not","passed","into","the","scope",",","it","returns","empty","string",".","When","the","request_type","is","passed","into","the","scope",",","it","returns","the","correct","value","."]
code: def test_request_type(self):
      """Test calling request_type on an instance of ASGIProxyRequest.
  
      When the request_type is not passed into the scope, it returns empty string.
      When the request_type is passed into the scope, it returns the correct value.
      """
      proxy_request = self.create_asgi_proxy_request(scope={})
      assert isinstance(proxy_request, ProxyRequest)
      assert proxy_request.request_type == ""
  
      request_type = "fake-request_type"
      proxy_request = self.create_asgi_proxy_request(
          scope={"type": request_type}
      )
      assert isinstance(proxy_request, ProxyRequest)
      assert proxy_request.request_type == request_type
  
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 2 for calling the TestASGIProxyRequest obj's underlying member method code with example usage: obj.test_request_type() without return types