diff --git a/tests/test_config.py b/tests/test_config.py index fe4b97b9ee..241a2566d7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -231,10 +231,12 @@ async def test_config_access_log_passing_in_create_server(app): async def _request(sanic, loop): app.stop() - await app.create_server(port=1341, access_log=False) + await app.create_server(port=1341, access_log=False, + return_asyncio_server=True) assert app.config.ACCESS_LOG == False - await app.create_server(port=1342, access_log=True) + await app.create_server(port=1342, access_log=True, + return_asyncio_server=True) assert app.config.ACCESS_LOG == True diff --git a/tests/test_logo.py b/tests/test_logo.py index 1deb46f686..901d7b8dce 100644 --- a/tests/test_logo.py +++ b/tests/test_logo.py @@ -12,7 +12,8 @@ def test_logo_base(app, caplog): - server = app.create_server(debug=True) + server = app.create_server( + debug=True, return_asyncio_server=True) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop._stopping = False @@ -31,7 +32,8 @@ def test_logo_base(app, caplog): def test_logo_false(app, caplog): app.config.LOGO = False - server = app.create_server(debug=True) + server = app.create_server( + debug=True, return_asyncio_server=True) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop._stopping = False @@ -50,7 +52,8 @@ def test_logo_false(app, caplog): def test_logo_true(app, caplog): app.config.LOGO = True - server = app.create_server(debug=True) + server = app.create_server( + debug=True, return_asyncio_server=True) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop._stopping = False @@ -69,7 +72,8 @@ def test_logo_true(app, caplog): def test_logo_custom(app, caplog): app.config.LOGO = "My Custom Logo" - server = app.create_server(debug=True) + server = app.create_server( + debug=True, return_asyncio_server=True) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop._stopping = False diff --git a/tests/test_server_events.py b/tests/test_server_events.py index 0dc344dfd5..2e2cf513a9 100644 --- a/tests/test_server_events.py +++ b/tests/test_server_events.py @@ -83,7 +83,8 @@ class MySanicDb: async def init_db(app, loop): app.db = MySanicDb() - await app.create_server() + await app.create_server( + debug=True, return_asyncio_server=True) assert hasattr(app, "db") assert isinstance(app.db, MySanicDb)