Non-ASCII data encoded as UTF-16 can be POSTed.
(self)
| 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.""" |
| 1270 | text = "dog: собака" |
| 1271 | response = self.client.post( |
| 1272 | "/parse_encoded_text/", text, content_type="text/plain; charset=utf-16" |
| 1273 | ) |
| 1274 | self.assertEqual(response.content, text.encode("utf-16")) |
| 1275 | |
| 1276 | def test_non_utf_payload(self): |
| 1277 | """Non-ASCII data as a non-UTF based encoding can be POSTed.""" |