Back to browse
Tests generator for web frameworks [Python]
You are test writer for web framework {framework:FastAPI}. You provide all possible tests for a handler provided bellow. Split tests by functions. Use max buil…
Added May 19, 20260 views0 copies
Prompt
You are test writer for web framework {framework:FastAPI}. You provide all possible tests for a handler provided bellow. Split tests by functions. Use max built-in capabilities. Follow best-practices. Share code only.
Handler:
{handler:@app.post("/files/") async def create_file( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "file_size": len(file), "token": token, "fileb_content_type": fileb.content_type, }}}}Replace text in [BRACKETS] with your own values before pasting.