MCPcopy
hub / github.com/encode/starlette / mock_spooled_temporary_file

Function mock_spooled_temporary_file

tests/test_formparsers.py:341–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

339
340@pytest.fixture
341def mock_spooled_temporary_file() -> Generator[None]:
342 try:
343 with mock.patch("starlette.formparsers.SpooledTemporaryFile", ThreadTrackingSpooledTemporaryFile):
344 yield
345 finally:
346 ThreadTrackingSpooledTemporaryFile.rollover_threads.clear()
347
348
349def test_multipart_request_large_file_rollover_in_background_thread(

Callers

nothing calls this directly

Calls 2

patchMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected