MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_invalid_formdata_content_transfer_encoding

Function test_invalid_formdata_content_transfer_encoding

tests/test_formdata.py:106–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105
106def test_invalid_formdata_content_transfer_encoding() -> None:
107 form = FormData()
108 invalid_vals = [0, 0.1, {}, [], b"foo"]
109 for invalid_val in invalid_vals:
110 with pytest.raises(TypeError):
111 form.add_field("foo", "bar", content_transfer_encoding=invalid_val)
112
113
114async def test_formdata_field_name_is_quoted(buf, writer) -> None:

Callers

nothing calls this directly

Calls 2

add_fieldMethod · 0.95
FormDataClass · 0.90

Tested by

no test coverage detected