MCPcopy
hub / github.com/encode/httpx / test_unicode_escape

Method test_unicode_escape

tests/test_multipart.py:457–462  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

455 assert expected in request.read()
456
457 def test_unicode_escape(self):
458 filename = "hello\\world\u0022"
459 expected = b'filename="hello\\\\world%22"'
460 files = {"upload": (filename, b"<file content>")}
461 request = httpx.Request("GET", "https://www.example.com", files=files)
462 assert expected in request.read()
463
464 def test_unicode_with_control_character(self):
465 filename = "hello\x1a\x1b\x1c"

Callers

nothing calls this directly

Calls 1

readMethod · 0.95

Tested by

no test coverage detected