class_docstr: Tests the /upload_file endpoint.
class_docstr_tok: ["Tests","the","\/upload_file","endpoint","."]
docstr: Upload should fail if the sessionId doesn't exist.
docstr_tok: ["Upload","should","fail","if","the","sessionId","does","n't","exist","."]
code: def test_upload_one_file(self):
      """Upload should fail if the sessionId doesn't exist."""
      file = MockFile("filename", b"123")
      params = {file.name: file.data}
      response = self._upload_files(
          params, session_id="sessionId", file_id="fileId"
      )
      self.assertEqual(400, response.code)
      self.assertIn("Invalid session_id", response.reason)
      self.assertEqual(
          self.file_mgr.get_files("sessionId", ["fileId"]), []
      )
  
imports: from typing import NamedTuple
  import requests
  import tornado.testing
  import tornado.web
  import tornado.websocket
  from streamlit.logger import get_logger
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager
  from streamlit.web.server.server import UPLOAD_FILE_ENDPOINT
  from streamlit.web.server.upload_file_request_handler import UploadFileRequestHandler
label_desc: Use image node_id 3 for calling the UploadFileRequestHandlerInvalidSessionTest obj's underlying member method code with example usage: obj.test_upload_one_file() without return types