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

Method test_ascii_body

Lib/test/test_httplib.py:2278–2284  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2276 self.assertEqual(4, len(f.read()))
2277
2278 def test_ascii_body(self):
2279 self.conn.request("PUT", "/url", "body")
2280 message, f = self.get_headers_and_fp()
2281 self.assertEqual("text/plain", message.get_content_type())
2282 self.assertIsNone(message.get_charset())
2283 self.assertEqual("4", message.get("content-length"))
2284 self.assertEqual(b'body', f.read())
2285
2286 def test_latin1_body(self):
2287 self.conn.request("PUT", "/url", "body\xc1")

Callers

nothing calls this directly

Calls 8

get_headers_and_fpMethod · 0.95
get_content_typeMethod · 0.80
assertIsNoneMethod · 0.80
get_charsetMethod · 0.80
requestMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected