code: def test_post_file(tmp_path: Path, client: TestClient):
      path = tmp_path / "test.txt"
      path.write_bytes(b"<file content>")
  
      with path.open("rb") as file:
          response = client.post("/files/", files={"file": file})
      assert response.status_code == 200, response.text
      assert response.json() == {"file_size": 14}
  
file_path: fastapi/tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py
imports: from pathlib import Path
  import pytest
  from dirty_equals import IsDict
  from fastapi.testclient import TestClient
  from ...utils import needs_py310
label_desc: Use image node_id 4 for calling a global function with example usage: test_post_file(tmp_path, client) without return types