()
| 359 | |
| 360 | |
| 361 | def test_environ_builder_empty_file(): |
| 362 | f = FileStorage(BytesIO(rb""), "empty.txt") |
| 363 | d = MultiDict(dict(f=f, s="")) |
| 364 | stream, length, boundary = stream_encode_multipart(d) |
| 365 | _, form, files = parse_form_data( |
| 366 | { |
| 367 | "wsgi.input": stream, |
| 368 | "CONTENT_LENGTH": str(length), |
| 369 | "CONTENT_TYPE": f'multipart/form-data; boundary="{boundary}"', |
| 370 | } |
| 371 | ) |
| 372 | assert form["s"] == "" |
| 373 | assert files["f"].read() == rb"" |
| 374 | stream.close() |
| 375 | files["f"].close() |
| 376 | |
| 377 | |
| 378 | def test_create_environ(): |
nothing calls this directly
no test coverage detected