MCPcopy
hub / github.com/urllib3/urllib3 / test_make_multipart

Method test_make_multipart

test/test_fields.py:39–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 assert headers_field.render_headers() == "Content-Length: 4\r\n\r\n"
38
39 def test_make_multipart(self) -> None:
40 field = RequestField("somename", "data")
41 field.make_multipart(content_type="image/jpg", content_location="/test")
42 assert (
43 field.render_headers()
44 == 'Content-Disposition: form-data; name="somename"\r\n'
45 "Content-Type: image/jpg\r\n"
46 "Content-Location: /test\r\n"
47 "\r\n"
48 )
49
50 def test_make_multipart_empty_filename(self) -> None:
51 field = RequestField("somename", "data", "")

Callers

nothing calls this directly

Calls 3

make_multipartMethod · 0.95
render_headersMethod · 0.95
RequestFieldClass · 0.90

Tested by

no test coverage detected