class_docstr: Tests the /upload_file endpoint.
class_docstr_tok: ["Tests","the","\/upload_file","endpoint","."]
docstr: Uploading a file should populate our file_mgr.
docstr_tok: ["Uploading","a","file","should","populate","our","file_mgr","."]
code: def test_upload_one_file(self):
      """Uploading a file should populate our file_mgr."""
      file = MockFile("filename", b"123")
      params = {file.name: file.data}
      response = self._upload_files(
          params, session_id="test_session_id", file_id=file.name
      )
  
      self.assertEqual(204, response.code, response.reason)
  
      self.assertEqual(
          [(file.name, file.name, file.data)],
          [
              (rec.file_id, rec.name, rec.data)
              for rec in self.file_mgr.get_files(
                  "test_session_id", [file.name]
              )
          ],
      )
  
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 UploadFileRequestHandlerTest obj's underlying member method code with example usage: obj.test_upload_one_file() without return types