MCPcopy Create free account
hub / github.com/python-websockets/websockets / test_parse_body

Method test_parse_body

tests/test_http11.py:80–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 )
79
80 def test_parse_body(self):
81 self.reader.feed_data(b"GET / HTTP/1.1\r\nContent-Length: 3\r\n\r\nYo\n")
82 with self.assertRaises(ValueError) as raised:
83 next(self.parse())
84 self.assertEqual(
85 str(raised.exception),
86 "unsupported request body",
87 )
88
89 def test_parse_body_content_length_zero(self):
90 self.reader.feed_data(b"GET / HTTP/1.1\r\nContent-Length: 0\r\n\r\n")

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
feed_dataMethod · 0.45

Tested by

no test coverage detected