MCPcopy Index your code
hub / github.com/python/cpython / test_latin1_header

Method test_latin1_header

Lib/test/test_httpservers.py:309–315  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

307 self.assertTrue(int(res.getheader('Content-Length')))
308
309 def test_latin1_header(self):
310 self.con.request('LATINONEHEADER', '/', headers={
311 'X-Special-Incoming': 'Ärger mit Unicode'
312 })
313 res = self.con.getresponse()
314 self.assertEqual(res.getheader('X-Special'), 'Dängerous Mind')
315 self.assertEqual(res.read(), 'Ärger mit Unicode'.encode('utf-8'))
316
317 def test_error_content_length(self):
318 # Issue #16088: standard error responses should have a content-length

Callers

nothing calls this directly

Calls 6

getheaderMethod · 0.80
requestMethod · 0.45
getresponseMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected