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

Method test_parse_invalid_reason

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

Source from the content-addressed store, hash-verified

204 )
205
206 def test_parse_invalid_reason(self):
207 self.reader.feed_data(b"HTTP/1.1 200 \x7f\r\n\r\n")
208 with self.assertRaises(ValueError) as raised:
209 next(self.parse())
210 self.assertEqual(
211 str(raised.exception),
212 "invalid HTTP reason phrase: \x7f",
213 )
214
215 def test_parse_invalid_header(self):
216 self.reader.feed_data(b"HTTP/1.1 500 Internal Server Error\r\nOops\r\n")

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
feed_dataMethod · 0.45

Tested by

no test coverage detected