MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_parse_empty

Method test_parse_empty

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

Source from the content-addressed store, hash-verified

160 self.assertEqual(response.body, b"")
161
162 def test_parse_empty(self):
163 self.reader.feed_eof()
164 with self.assertRaises(EOFError) as raised:
165 next(self.parse())
166 self.assertEqual(
167 str(raised.exception),
168 "connection closed while reading HTTP status line",
169 )
170
171 def test_parse_invalid_status_line(self):
172 self.reader.feed_data(b"Hello!\r\n")

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
feed_eofMethod · 0.45

Tested by

no test coverage detected