MCPcopy
hub / github.com/aio-libs/aiohttp / test_http_request_parser

Method test_http_request_parser

tests/test_http_parser.py:403–415  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

401 b'get /path HTTP/1.1\r\ntest: line\r\ntest2: data\r\n\r\n')
402
403 def test_http_request_parser(self):
404 out = aiohttp.FlowControlDataQueue(self.stream)
405 buf = aiohttp.ParserBuffer()
406 p = protocol.HttpRequestParser()(out, buf)
407 next(p)
408 try:
409 p.send(b'get /path HTTP/1.1\r\n\r\n')
410 except StopIteration:
411 pass
412 result = out._buffer[0][0]
413 self.assertEqual(
414 ('GET', '/path', (1, 1), CIMultiDict(), [], False, None),
415 result)
416
417 def test_http_request_parser_utf8(self):
418 out = aiohttp.FlowControlDataQueue(self.stream)

Callers

nothing calls this directly

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected