MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_set_multipart_form

Method test_set_multipart_form

test/mitmproxy/test_http.py:441–448  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

439 assert list(request.multipart_form.items()) == []
440
441 def test_set_multipart_form(self):
442 request = treq()
443 request.multipart_form = [(b"file", b"shell.jpg"), (b"file_size", b"1000")]
444 assert request.headers["Content-Type"].startswith("multipart/form-data")
445 assert list(request.multipart_form.items()) == [
446 (b"file", b"shell.jpg"),
447 (b"file_size", b"1000"),
448 ]
449
450
451class TestResponse:

Callers

nothing calls this directly

Calls 2

treqFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected