()
| 316 | |
| 317 | |
| 318 | def test_environ_builder_stream_switch(): |
| 319 | d = MultiDict(dict(foo="bar", blub="blah", hu="hum")) |
| 320 | for use_tempfile in False, True: |
| 321 | stream, length, boundary = stream_encode_multipart( |
| 322 | d, use_tempfile, threshold=150 |
| 323 | ) |
| 324 | assert isinstance(stream, BytesIO) != use_tempfile |
| 325 | |
| 326 | form = parse_form_data( |
| 327 | { |
| 328 | "wsgi.input": stream, |
| 329 | "CONTENT_LENGTH": str(length), |
| 330 | "CONTENT_TYPE": f'multipart/form-data; boundary="{boundary}"', |
| 331 | } |
| 332 | )[1] |
| 333 | assert form == d |
| 334 | stream.close() |
| 335 | |
| 336 | |
| 337 | def test_environ_builder_unicode_file_mix(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…