()
| 239 | |
| 240 | |
| 241 | async def test_files() -> None: |
| 242 | app = Quart(__name__) |
| 243 | |
| 244 | @app.route("/", methods=["POST"]) |
| 245 | async def echo() -> Response: |
| 246 | files = await request.files |
| 247 | data = files["file"].read() |
| 248 | return data |
| 249 | |
| 250 | client = Client(app) |
| 251 | response = await client.post( |
| 252 | "/", files={"file": FileStorage(BytesIO(b"bar"), filename="a.txt")} |
| 253 | ) |
| 254 | assert (await response.get_data(as_text=True)) == "bar" |
| 255 | |
| 256 | |
| 257 | async def test_data() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…