mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
tornado: Extract AsyncDjangoHandlerBase and mark as nocoverage.
We're never going to add tests for this block, which is fundamentally well-tested code from Django with a since line changed which is hard to screw up (long-polling will not work at all without it). The hope is to remove it entirely and replace it with a cleaner monkey-patch, but until then, unit tests for it would be redundant.
This commit is contained in:
@@ -74,7 +74,8 @@ def finish_handler(handler_id: int, event_queue_id: str,
|
||||
|
||||
|
||||
# Modified version of the base Tornado handler for Django
|
||||
class AsyncDjangoHandler(tornado.web.RequestHandler, base.BaseHandler):
|
||||
# We mark this for nocoverage, since we only change 1 line of actual code.
|
||||
class AsyncDjangoHandlerBase(tornado.web.RequestHandler, base.BaseHandler): # nocoverage
|
||||
initLock = Lock()
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
@@ -323,6 +324,7 @@ class AsyncDjangoHandler(tornado.web.RequestHandler, base.BaseHandler):
|
||||
|
||||
return response
|
||||
|
||||
class AsyncDjangoHandler(AsyncDjangoHandlerBase):
|
||||
def zulip_finish(self, response: Dict[str, Any], request: HttpRequest,
|
||||
apply_markdown: bool) -> None:
|
||||
# Make sure that Markdown rendering really happened, if requested.
|
||||
|
||||
Reference in New Issue
Block a user