MCPcopy
hub / github.com/pallets/werkzeug / test_from_directory

Function test_from_directory

tests/test_send_file.py:180–184  ·  view source on GitHub ↗
(directory, path)

Source from the content-addressed store, hash-verified

178 [(str(res_path), "test.txt"), (res_path, pathlib.Path("test.txt"))],
179)
180def test_from_directory(directory, path):
181 rv = send_from_directory(directory, path, environ)
182 rv.direct_passthrough = False
183 assert rv.data.strip() == b"FOUND"
184 rv.close()
185
186
187@pytest.mark.parametrize("path", ["../res/test.txt", "nothing.txt", "null\x00.txt"])

Callers

nothing calls this directly

Calls 2

send_from_directoryFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected