MCPcopy Create free account
hub / github.com/EasyIME/PIME / find_handler

Method find_handler

python/python3/tornado/test/routing_test.py:35–48  ·  view source on GitHub ↗
(self, request, **kwargs)

Source from the content-addressed store, hash-verified

33
34class BasicRouter(Router):
35 def find_handler(self, request, **kwargs):
36 class MessageDelegate(HTTPMessageDelegate):
37 def __init__(self, connection):
38 self.connection = connection
39
40 def finish(self):
41 self.connection.write_headers(
42 ResponseStartLine("HTTP/1.1", 200, "OK"),
43 HTTPHeaders({"Content-Length": "2"}),
44 b"OK",
45 )
46 self.connection.finish()
47
48 return MessageDelegate(request.connection)
49
50
51class BasicRouterTestCase(AsyncHTTPTestCase):

Callers

nothing calls this directly

Calls 1

MessageDelegateClass · 0.70

Tested by

no test coverage detected