Skip to content

Commit 1f8855b

Browse files
committed
Provide runTest for tornado 6.1
1 parent 1be3c06 commit 1f8855b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_standalone.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5-
from tornado.testing import AsyncHTTPTestCase
5+
from tornado import testing
66

77
from jupyter_server_proxy.standalone import _default_address_and_port, make_proxy_app
88

@@ -57,12 +57,14 @@ def make_app(unix_socket: bool, skip_authentication: bool):
5757
)
5858

5959

60-
class TestStandaloneProxyRedirect(AsyncHTTPTestCase):
60+
class TestStandaloneProxyRedirect(testing.AsyncHTTPTestCase):
6161
"""
6262
Ensure requests are proxied to the application. We need to disable authentication here,
6363
as we do not want to be redirected to the JupyterHub Login.
6464
"""
6565

66+
runTest = None # Required for Tornado 6.1
67+
6668
def get_app(self):
6769
return make_app(False, True)
6870

@@ -90,7 +92,9 @@ def test_on_prefix(self):
9092
@pytest.mark.skipif(
9193
sys.platform == "win32", reason="Unix socket not supported on Windows"
9294
)
93-
class TestStandaloneProxyWithUnixSocket(AsyncHTTPTestCase):
95+
class TestStandaloneProxyWithUnixSocket(testing.AsyncHTTPTestCase):
96+
runTest = None # Required for Tornado 6.1
97+
9498
def get_app(self):
9599
return make_app(True, True)
96100

@@ -104,11 +108,13 @@ def test_with_unix_socket(self):
104108
assert "X-Proxycontextpath: /some/prefix/" in body
105109

106110

107-
class TestStandaloneProxyLogin(AsyncHTTPTestCase):
111+
class TestStandaloneProxyLogin(testing.AsyncHTTPTestCase):
108112
"""
109113
Ensure we redirect to JupyterHub login when authentication is enabled
110114
"""
111115

116+
runTest = None # Required for Tornado 6.1
117+
112118
def get_app(self):
113119
return make_app(False, False)
114120

0 commit comments

Comments
 (0)