MCPcopy
hub / github.com/benoitc/gunicorn / check

Method check

tests/treq.py:282–289  ·  view source on GitHub ↗
(self, cfg, sender, sizer, matcher)

Source from the content-addressed store, hash-verified

280 return ret
281
282 def check(self, cfg, sender, sizer, matcher):
283 cases = self.expect[:]
284 p = RequestParser(cfg, sender(), None)
285 parsed_request_idx = -1
286 for parsed_request_idx, req in enumerate(p):
287 self.same(req, sizer, matcher, cases.pop(0))
288 assert len(self.expect) == parsed_request_idx + 1
289 assert not cases
290
291 def same(self, req, sizer, matcher, exp):
292 assert req.method == exp["method"]

Callers 4

test_reqMethod · 0.95
test_asgi_parserFunction · 0.45
test_http_parserFunction · 0.45
test_asgi_parserFunction · 0.45

Calls 2

sameMethod · 0.95
RequestParserClass · 0.90

Tested by 4

test_reqMethod · 0.76
test_asgi_parserFunction · 0.36
test_http_parserFunction · 0.36
test_asgi_parserFunction · 0.36