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

Method dispatch

aiohttp/test_utils.py:192–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

190 return wrapper
191
192 def dispatch(self): # pragma: no cover
193 for route, fn in self._mapping:
194 match = route.match(self._path)
195 if match is not None:
196 try:
197 return getattr(self, fn)(match)
198 except Exception:
199 out = io.StringIO()
200 traceback.print_exc(file=out)
201 self._response(500, out.getvalue())
202
203 return
204
205 return self._response(self._start_response(404))
206
207 def _start_response(self, code):
208 return aiohttp.Response(self._srv.writer, code)

Callers 1

handle_requestMethod · 0.45

Calls 3

_responseMethod · 0.95
_start_responseMethod · 0.95
matchMethod · 0.45

Tested by

no test coverage detected