MCPcopy
hub / github.com/django/django / test_utf8_payload

Method test_utf8_payload

tests/test_client_regress/tests.py:1260–1266  ·  view source on GitHub ↗

Non-ASCII data encoded as UTF-8 can be POSTed.

(self)

Source from the content-addressed store, hash-verified

1258 self.assertEqual(response.content, text.encode())
1259
1260 def test_utf8_payload(self):
1261 """Non-ASCII data encoded as UTF-8 can be POSTed."""
1262 text = "dog: собака"
1263 response = self.client.post(
1264 "/parse_encoded_text/", text, content_type="text/plain; charset=utf-8"
1265 )
1266 self.assertEqual(response.content, text.encode())
1267
1268 def test_utf16_payload(self):
1269 """Non-ASCII data encoded as UTF-16 can be POSTed."""

Callers

nothing calls this directly

Calls 2

postMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected