Imported or synced from PromptPort public prompt data.
2023-06-29 07:56Web框架测试生成器 [Python]
您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。
Web框架测试生成器 [Python]
Imported from PromptPort: https://app.promptport.ai/details?id=649d3931eb615c21c32d99a3
PromptPort ID: 649d3931eb615c21c32d99a3
Topics: Development, Code, Prompt, Tools
Prompt Description
您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。
Original Prompt
您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。
处理程序:
{handler:@app.post("/files/") async def createfile( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "filesize": len(file), "token": token, "filebcontenttype": fileb.content_type, }}
Prompt.md excerpt
您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。
处理程序:
{handler:@app.post("/files/") async def createfile( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "filesize": len(file), "token": token, "fileb_conte...
Prompt.md
您是Web框架 {framework:FastAPI} 的测试编写者。您为下面提供的处理程序提供所有可能的测试。按函数拆分测试。使用最大的内置功能。遵循最佳实践。仅共享代码。
处理程序:
{handler:@app.post("/files/") async def createfile( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "filesize": len(file), "token": token, "filebcontenttype": fileb.content_type, }}
输入变量
Source: https://app.promptport.ai/details?id=649d3931eb615c21c32d99a3 PromptPort ID: 649d3931eb615c21c32d99a3 Category: Development Topics: Development, Code, Prompt, Tools Models: OpenAI PromptPort metrics: views=317, copies=83, collects=1, score=78
输出要求
请按照提示词正文中的目标、约束和输出格式生成结果。