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

Function test_object

tests/test_send_file.py:47–53  ·  view source on GitHub ↗
(file_factory)

Source from the content-addressed store, hash-verified

45 "file_factory", [lambda: txt_path.open("rb"), lambda: io.BytesIO(b"test")]
46)
47def test_object(file_factory):
48 rv = send_file(file_factory(), environ, mimetype="text/plain", use_x_sendfile=True)
49 rv.direct_passthrough = False
50 assert rv.data
51 assert rv.mimetype == "text/plain"
52 assert "x-sendfile" not in rv.headers
53 rv.close()
54
55
56def test_object_without_mimetype():

Callers

nothing calls this directly

Calls 2

send_fileFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected