Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testing_file_store (0.09 seconds)

  1. tests/test_datastructures.py

    def test_upload_file_is_closed(tmp_path: Path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        app = FastAPI()
    
        testing_file_store: list[UploadFile] = []
    
        @app.post("/uploadfile/")
        def create_upload_file(file: UploadFile):
            testing_file_store.append(file)
            return {"filename": file.filename}
    
        client = TestClient(app)
        with path.open("rb") as file:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1.8K bytes
    - Click Count (0)
Back to Top