This commit is contained in:
Adam Hopkins 2020-07-14 10:13:30 +03:00
parent cf234fca15
commit 9e053bef19

View File

@ -205,11 +205,8 @@ class SanicASGITestClient(httpx.AsyncClient):
def _collect_request(request): def _collect_request(request):
self.last_request = request self.last_request = request
def _start_test_mode(request):
self.app.test_mode = True
@app.listener("after_server_start") @app.listener("after_server_start")
def _end_test_mode(sanic, loop): def _start_test_mode(sanic, loop):
sanic.test_mode = True sanic.test_mode = True
@app.listener("before_server_end") @app.listener("before_server_end")