MCPcopy
hub / github.com/django/django / test_simple_payload

Method test_simple_payload

tests/test_client_regress/tests.py:1252–1258  ·  view source on GitHub ↗

A simple ASCII-only text can be POSTed.

(self)

Source from the content-addressed store, hash-verified

1250 """Regression tests for #10571."""
1251
1252 def test_simple_payload(self):
1253 """A simple ASCII-only text can be POSTed."""
1254 text = "English: mountain pass"
1255 response = self.client.post(
1256 "/parse_encoded_text/", text, content_type="text/plain"
1257 )
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."""

Callers

nothing calls this directly

Calls 2

postMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected