Move server.py into its own module (#2230)

* Move server.py into its own module

* Change monkeypatch path on test_logging.py
This commit is contained in:
Adam Hopkins
2021-08-31 11:51:32 +03:00
committed by GitHub
parent 9d0b54c90d
commit 945885d501
11 changed files with 951 additions and 890 deletions

View File

@@ -116,7 +116,9 @@ def test_log_connection_lost(app, debug, monkeypatch):
stream = StringIO()
error = logging.getLogger("sanic.error")
error.addHandler(logging.StreamHandler(stream))
monkeypatch.setattr(sanic.server, "error_logger", error)
monkeypatch.setattr(
sanic.server.protocols.http_protocol, "error_logger", error
)
@app.route("/conn_lost")
async def conn_lost(request):