返回
Web框架测试生成器 [Python]
教育
发展
代码
提示
工具
模板内容
模板ID复制
660e66e185d9f
Prompt复制

您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。 处理程序: {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, }}

代码示例