@@ -107,7 +107,7 @@ def jp_argv():
107
107
108
108
109
109
@pytest .fixture ()
110
- def http_port (http_server_port ):
110
+ def jp_http_port (http_server_port ):
111
111
"""Returns the port value from the http_server_port fixture."""
112
112
yield http_server_port [- 1 ]
113
113
http_server_port [0 ].close ()
@@ -161,7 +161,7 @@ def jp_configurable_serverapp(
161
161
jp_environ ,
162
162
jp_server_config ,
163
163
jp_argv ,
164
- http_port ,
164
+ jp_http_port ,
165
165
jp_base_url ,
166
166
tmp_path ,
167
167
jp_root_dir ,
@@ -195,7 +195,7 @@ def _configurable_serverapp(
195
195
base_url = jp_base_url ,
196
196
argv = jp_argv ,
197
197
environ = jp_environ ,
198
- http_port = http_port ,
198
+ http_port = jp_http_port ,
199
199
tmp_path = tmp_path ,
200
200
io_loop = io_loop ,
201
201
root_dir = jp_root_dir ,
@@ -222,7 +222,7 @@ def _configurable_serverapp(
222
222
app = ServerApp .instance (
223
223
# Set the log level to debug for testing purposes
224
224
log_level = "DEBUG" ,
225
- port = http_port ,
225
+ port = jp_http_port ,
226
226
port_retries = 0 ,
227
227
open_browser = False ,
228
228
base_url = base_url ,
@@ -315,7 +315,7 @@ def client_fetch(*parts, headers=None, params=None, **kwargs):
315
315
316
316
317
317
@pytest .fixture
318
- def jp_ws_fetch (jp_serverapp , http_server_client , jp_auth_header , http_port , jp_base_url ):
318
+ def jp_ws_fetch (jp_serverapp , http_server_client , jp_auth_header , jp_http_port , jp_base_url ):
319
319
"""Sends a websocket request to a test server.
320
320
The fixture is a factory; it can be called like
321
321
a function inside a unit test. Here's a basic
@@ -348,7 +348,7 @@ def client_fetch(*parts, headers=None, params=None, **kwargs):
348
348
# Handle URL strings
349
349
path_url = url_escape (url_path_join (* parts ), plus = False )
350
350
base_path_url = url_path_join (jp_base_url , path_url )
351
- urlparts = urllib .parse .urlparse (f"ws://localhost:{ http_port } " )
351
+ urlparts = urllib .parse .urlparse (f"ws://localhost:{ jp_http_port } " )
352
352
urlparts = urlparts ._replace (path = base_path_url , query = urllib .parse .urlencode (params ))
353
353
url = urlparts .geturl ()
354
354
# Add auth keys to header
0 commit comments