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

Method test_parse_invalid_header

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

Source from the content-addressed store, hash-verified

69 )
70
71 def test_parse_invalid_header(self):
72 self.reader.feed_data(b"GET /chat HTTP/1.1\r\nOops\r\n")
73 with self.assertRaises(ValueError) as raised:
74 next(self.parse())
75 self.assertEqual(
76 str(raised.exception),
77 "invalid HTTP header line: Oops",
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")

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
feed_dataMethod · 0.45

Tested by

no test coverage detected