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

Method test_parse_empty

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

Source from the content-addressed store, hash-verified

33 self.assertEqual(request.headers["Upgrade"], "websocket")
34
35 def test_parse_empty(self):
36 self.reader.feed_eof()
37 with self.assertRaises(EOFError) as raised:
38 next(self.parse())
39 self.assertEqual(
40 str(raised.exception),
41 "connection closed while reading HTTP request line",
42 )
43
44 def test_parse_invalid_request_line(self):
45 self.reader.feed_data(b"GET /\r\n\r\n")

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
feed_eofMethod · 0.45

Tested by

no test coverage detected