MCPcopy Create free account
hub / github.com/pallets/quart / test_make_test_body_with_headers_files

Function test_make_test_body_with_headers_files

tests/test_testing.py:106–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105
106def test_make_test_body_with_headers_files() -> None:
107 body, headers = make_test_body_with_headers(
108 files={"a": FileStorage(BytesIO(b"abc"), filename="Quart")}
109 )
110 assert body == (
111 b'\r\n------QuartBoundary\r\nContent-Disposition: form-data; name="a"; '
112 b'filename="Quart"\r\n\r\nabc\r\n------QuartBoundary--\r\n'
113 )
114 assert headers == Headers(
115 {"Content-Type": "multipart/form-data; boundary=----QuartBoundary"}
116 )
117
118
119def test_make_test_body_with_headers_form_and_files() -> None:

Callers

nothing calls this directly

Calls 2

FileStorageClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…